Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ private
dist.zip

.clasp.json

*~
Comment thread
coderabbitai[bot] marked this conversation as resolved.
5 changes: 5 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
enableGlobalCache: true

enableScripts: false

nodeLinker: node-modules

npmMinimalAgeGate: 1w
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "empower-poster",
"private": true,
"license": "MIT",
"packageManager": "yarn@4.11.0",
"packageManager": "yarn@4.17.0",
"workspaces": [
"packages/*"
],
Expand Down
6 changes: 3 additions & 3 deletions packages/apps-script-sample/clasp-redeploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ clasp push -f
# Find the single non-HEAD deployment
deployments_output=$(clasp list-deployments)
deployment_id=$(echo "$deployments_output" |
grep -e '^-' |
grep -e '^-' |
awk '$3 != "@HEAD" {print $2}')
[[ $(echo "$deployment_id" | wc -w) -eq 1 ]] || {
[[ $(echo "$deployment_id" | wc -w) -eq 1 ]] || {
echo "FAILED. Script only works with exactly 1 non-HEAD deployment:
$deployments_output";
exit 1;
exit 1;
}

version_output=$(clasp create-version 'Untitled')
Expand Down
4 changes: 2 additions & 2 deletions packages/apps-script-sample/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "apps-script-samples",
"name": "apps-script-sample",
"private": true,
"version": "0.2.9",
"description": "Sample Apps Script Web App for use with Empower Poster extension",
Expand All @@ -15,7 +15,7 @@
"build:redeploy": "yarn build:check && yarn redeploy",
"redeploy": "./clasp-redeploy.sh",
"typecheck": "tsc --noEmit",
"lint": "eslint '{src,tests}/**/*.{js,ts}'",
"lint": "eslint './*.{js,ts}' '{src,tests}/**/*.{js,ts}'",
"lint:fix": "yarn lint --fix",
"format:check": "prettier './*.{js,ts}' '{src,tests}/**/*.{js,ts}' --check",
"format": "prettier './*.{js,ts}' '{src,tests}/**/*.{js,ts}' --write",
Expand Down
8 changes: 4 additions & 4 deletions packages/apps-script-sample/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,18 @@ export function doPost(e: GoogleAppsScript.Events.DoPost) {
classifications,
accounts,
} = JSON.parse(e.postData.contents) as PostPayload;
console.log(`API version: ${major}.${minor}`);
Logger.log(`API version: ${major}.${minor}`);
const supported = { major: 0, minor: 6 };
if (major !== supported.major || minor < supported.minor) {
throw new Error(
`data version ${major}.${minor} not supported, expected at least ${supported.major}.${supported.minor}`,
);
}
console.log(`Received ${holdings.length} holdings`);
console.log(
Logger.log(`Received ${holdings.length} holdings`);
Logger.log(
`Classifications for ${Object.keys(classifications).length} tickers`,
);
console.log(`${accounts.length} accounts`);
Logger.log(`${accounts.length} accounts`);
// Write data to sheets
const spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
const classificationsSheet = spreadsheet.getSheetByName("classifications");
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"dist": "rm -f dist.zip && yarn build && cd dist && zip -r ../dist.zip *",
"clean": "rm -rf dist",
"typecheck": "tsc --noEmit",
"lint": "eslint '{.,src,tests}/**/*.{js,ts}'",
"lint": "eslint './*.{js,ts}' '{src,tests}/**/*.{js,ts}'",
"lint:fix": "yarn lint --fix",
"format:check": "prettier --no-error-on-unmatched-pattern './*.{js,ts}' '{src,tests}/**/*.{js,ts}' --check",
"format": "prettier --no-error-on-unmatched-pattern './*.{js,ts}' '{src,tests}/**/*.{js,ts}' --write",
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Manual changes might be lost - proceed with caution!

__metadata:
version: 8
version: 10
cacheKey: 10c0

"@emnapi/core@npm:1.10.0":
Expand Down Expand Up @@ -950,9 +950,9 @@ __metadata:
languageName: node
linkType: hard

"apps-script-samples@workspace:packages/apps-script-sample":
"apps-script-sample@workspace:packages/apps-script-sample":
version: 0.0.0-use.local
resolution: "apps-script-samples@workspace:packages/apps-script-sample"
resolution: "apps-script-sample@workspace:packages/apps-script-sample"
dependencies:
"@rollup/plugin-node-resolve": "npm:^16.0.3"
"@rollup/plugin-typescript": "npm:^12.3.0"
Expand Down