@freeappstore/cli 0.4.97 → 0.4.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,7 +14,7 @@ export declare const DEPLOY_ACTIONS: {
14
14
  readonly uploadArtifact: "actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2";
15
15
  readonly downloadArtifact: "actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0";
16
16
  };
17
- export declare const INSTALL_APP_DEPENDENCIES = "set -euo pipefail\nif [ ! -f pnpm-lock.yaml ]; then\n echo \"Creating the first dependency lock for this app.\"\n pnpm install --no-frozen-lockfile\nelse\n log=$(mktemp)\n if pnpm install --frozen-lockfile >\"$log\" 2>&1; then\n cat \"$log\"\n else\n status=$?\n cat \"$log\"\n if grep -q 'ERR_PNPM_OUTDATED_LOCKFILE' \"$log\"; then\n echo \"Dependency manifests changed; updating the app lock deliberately.\"\n pnpm install --no-frozen-lockfile\n else\n rm \"$log\"\n exit \"$status\"\n fi\n fi\n rm \"$log\"\nfi\n";
17
+ export declare const INSTALL_APP_DEPENDENCIES = "set -euo pipefail\nif [ ! -f pnpm-lock.yaml ]; then\n echo \"Creating the first dependency lock for this app.\"\n pnpm install --no-frozen-lockfile\nelse\n log=$(mktemp)\n if pnpm install --frozen-lockfile >\"$log\" 2>&1; then\n cat \"$log\"\n else\n status=$?\n cat \"$log\"\n if grep -q 'ERR_PNPM_OUTDATED_LOCKFILE' \"$log\"; then\n echo \"::error::pnpm-lock.yaml does not match package.json. Run pnpm install locally and commit the updated lock; deploys never rewrite it.\"\n fi\n rm \"$log\"\n exit \"$status\"\n fi\n rm \"$log\"\nfi\n";
18
18
  /** Run only after typecheck/build/artifact validation and before deploying bytes. */
19
19
  export declare const SAVE_APP_DEPENDENCY_LOCK = "set -euo pipefail\ntest -f pnpm-lock.yaml\ngit add -- pnpm-lock.yaml\nif ! git diff --cached --quiet -- pnpm-lock.yaml; then\n git config user.name \"FreeAppStore dependency lock\"\n git config user.email \"dependency-lock@freeappstore.online\"\n git commit -m \"build: retain verified dependency resolution [skip ci]\" -- pnpm-lock.yaml\n # A normal push rejects concurrent main changes; never overwrite newer app work.\n git push origin HEAD:main\nfi\necho \"Accepted source: $(git rev-parse HEAD)\"\n";
20
20
  //# sourceMappingURL=starter-dependencies.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"starter-dependencies.d.ts","sourceRoot":"","sources":["../../src/lib/starter-dependencies.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,eAAO,MAAM,sBAAsB,WAAW,CAAC;AAE/C,6GAA6G;AAC7G,eAAO,MAAM,uBAAuB,WAAW,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC;AAEX,eAAO,MAAM,wBAAwB,qjBAqBpC,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,wBAAwB,igBAWpC,CAAC"}
1
+ {"version":3,"file":"starter-dependencies.d.ts","sourceRoot":"","sources":["../../src/lib/starter-dependencies.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,eAAO,MAAM,sBAAsB,WAAW,CAAC;AAE/C,6GAA6G;AAC7G,eAAO,MAAM,uBAAuB,WAAW,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC;AAEX,eAAO,MAAM,wBAAwB,ikBAmBpC,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,wBAAwB,igBAWpC,CAAC"}
@@ -26,12 +26,10 @@ else
26
26
  status=$?
27
27
  cat "$log"
28
28
  if grep -q 'ERR_PNPM_OUTDATED_LOCKFILE' "$log"; then
29
- echo "Dependency manifests changed; updating the app lock deliberately."
30
- pnpm install --no-frozen-lockfile
31
- else
32
- rm "$log"
33
- exit "$status"
29
+ echo "::error::pnpm-lock.yaml does not match package.json. Run pnpm install locally and commit the updated lock; deploys never rewrite it."
34
30
  fi
31
+ rm "$log"
32
+ exit "$status"
35
33
  fi
36
34
  rm "$log"
37
35
  fi
@@ -1 +1 @@
1
- {"version":3,"file":"starter-dependencies.js","sourceRoot":"","sources":["../../src/lib/starter-dependencies.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC;AAE/C,6GAA6G;AAC7G,MAAM,CAAC,MAAM,uBAAuB,GAAG,QAAQ,CAAC;AAEhD;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,QAAQ,EAAE,oEAAoE;IAC9E,IAAI,EAAE,qEAAqE;IAC3E,SAAS,EAAE,sEAAsE;IACjF,cAAc,EAAE,2EAA2E;IAC3F,gBAAgB,EAAE,6EAA6E;CACvF,CAAC;AAEX,MAAM,CAAC,MAAM,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;CAqBvC,CAAC;AAEF,qFAAqF;AACrF,MAAM,CAAC,MAAM,wBAAwB,GAAG;;;;;;;;;;;CAWvC,CAAC"}
1
+ {"version":3,"file":"starter-dependencies.js","sourceRoot":"","sources":["../../src/lib/starter-dependencies.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC;AAE/C,6GAA6G;AAC7G,MAAM,CAAC,MAAM,uBAAuB,GAAG,QAAQ,CAAC;AAEhD;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,QAAQ,EAAE,oEAAoE;IAC9E,IAAI,EAAE,qEAAqE;IAC3E,SAAS,EAAE,sEAAsE;IACjF,cAAc,EAAE,2EAA2E;IAC3F,gBAAgB,EAAE,6EAA6E;CACvF,CAAC;AAEX,MAAM,CAAC,MAAM,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;CAmBvC,CAAC;AAEF,qFAAqF;AACrF,MAAM,CAAC,MAAM,wBAAwB,GAAG;;;;;;;;;;;CAWvC,CAAC"}
@@ -13,7 +13,7 @@ export declare const APP_ARCHETYPES: readonly AppArchetype[];
13
13
  * The token is requested for the store API's audience; the API maps the
14
14
  * verified repository_id to exactly one app and refuses anything else.
15
15
  */
16
- export declare const KEYLESS_UPLOAD = "set -euo pipefail\ncd site\ntest -n \"$(ls -A .)\" || { echo \"::error::build artifact is empty\"; exit 1; }\nfind . -type f -printf '%P\\t%s\\n' \\\n | jq -Rn '[inputs | split(\"\\t\") | {key: .[0], value: (.[1] | tonumber)}] | from_entries' \\\n > \"$RUNNER_TEMP/sizes.json\"\n# Content hashes let the API skip files unchanged since the live release.\nfind . -type f -print0 | xargs -0 sha256sum \\\n | jq -Rn '[inputs | capture(\"^(?<h>[0-9a-f]{64}) \\\\./(?<p>.*)$\")] | map({key: .p, value: .h}) | from_entries' \\\n > \"$RUNNER_TEMP/hashes.json\"\njq -n --slurpfile f \"$RUNNER_TEMP/sizes.json\" --slurpfile h \"$RUNNER_TEMP/hashes.json\" \\\n '{files: $f[0], hashes: $h[0]}' > \"$RUNNER_TEMP/manifest.json\"\noidc=$(curl -fsS -H \"Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN\" \\\n \"$ACTIONS_ID_TOKEN_REQUEST_URL&audience=$DEPLOY_API\" | jq -r .value)\necho \"::add-mask::$oidc\"\nsession=$(curl -sS --fail-with-body -X POST \"$DEPLOY_API/v1/deploys\" \\\n -H \"Authorization: Bearer $oidc\" -H 'Content-Type: application/json' \\\n --data-binary @\"$RUNNER_TEMP/manifest.json\") \\\n || { echo \"::error::deploy refused: $session\"; exit 1; }\nprintf '%s' \"$session\" > \"$RUNNER_TEMP/session.json\"\nDEPLOY_TOKEN=$(jq -r .token \"$RUNNER_TEMP/session.json\")\necho \"::add-mask::$DEPLOY_TOKEN\"\nDEPLOY_URL=\"$DEPLOY_API/v1/deploys/$(jq -r .id \"$RUNNER_TEMP/session.json\")\"\nexport DEPLOY_TOKEN DEPLOY_URL\nupload() {\n curl -sS --fail-with-body --retry 3 --retry-all-errors -T \"./$1\" \\\n -H \"Authorization: Bearer $DEPLOY_TOKEN\" -H 'Content-Type: application/octet-stream' \\\n \"$DEPLOY_URL/files/$(jq -rn --arg p \"$1\" '$p | split(\"/\") | map(@uri) | join(\"/\")')\"\n}\nexport -f upload\nif jq -e 'has(\"missing\")' \"$RUNNER_TEMP/session.json\" > /dev/null; then\n # Delta: upload only what changed; the API copies the rest from the live release.\n echo \"Delta deploy: $(jq '.missing | length' \"$RUNNER_TEMP/session.json\") to upload, $(jq '.reuse | length' \"$RUNNER_TEMP/session.json\") reused from the live release\"\n jq -r '.missing[]' \"$RUNNER_TEMP/session.json\" | tr '\\n' '\\0' | xargs -0 -P 8 -n 1 bash -c 'upload \"$1\"' _\n reuse_batch() {\n curl -sS --fail-with-body --retry 3 --retry-all-errors -X POST \\\n -H \"Authorization: Bearer $DEPLOY_TOKEN\" -H 'Content-Type: application/json' \\\n --data-binary \"$1\" \"$DEPLOY_URL/reuse\" -w \"reuse batch: HTTP %{http_code} in %{time_total}s\\n\"\n }\n export -f reuse_batch\n jq -c '.reuse as $r | if ($r | length) == 0 then empty else ($r | _nwise(100) | {paths: .}) end' \\\n \"$RUNNER_TEMP/session.json\" | tr '\\n' '\\0' | xargs -0 -P 3 -n 1 bash -c 'reuse_batch \"$1\"' _\nelse\n find . -type f -printf '%P\\0' | xargs -0 -P 8 -n 1 bash -c 'upload \"$1\"' _\nfi\ncurl -sS --fail-with-body -X POST -H \"Authorization: Bearer $DEPLOY_TOKEN\" \"$DEPLOY_URL/commit\"\necho\necho \"Deployed ${GITHUB_REPOSITORY##*/} from ${GITHUB_SHA::7}\"\n";
16
+ export declare const KEYLESS_UPLOAD = "set -euo pipefail\ncd site\ntest -n \"$(ls -A .)\" || { echo \"::error::build artifact is empty\"; exit 1; }\nfind . -type f -printf '%P\\t%s\\n' \\\n | jq -Rn '[inputs | split(\"\\t\") | {key: .[0], value: (.[1] | tonumber)}] | from_entries' \\\n > \"$RUNNER_TEMP/sizes.json\"\n# Content hashes let the API skip files unchanged since the live release.\nfind . -type f -print0 | xargs -0 sha256sum \\\n | jq -Rn '[inputs | capture(\"^(?<h>[0-9a-f]{64}) \\\\./(?<p>.*)$\")] | map({key: .p, value: .h}) | from_entries' \\\n > \"$RUNNER_TEMP/hashes.json\"\njq -n --slurpfile f \"$RUNNER_TEMP/sizes.json\" --slurpfile h \"$RUNNER_TEMP/hashes.json\" \\\n '{files: $f[0], hashes: $h[0]}' > \"$RUNNER_TEMP/manifest.json\"\noidc=$(curl -fsS -H \"Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN\" \\\n \"$ACTIONS_ID_TOKEN_REQUEST_URL&audience=$DEPLOY_API\" | jq -r .value)\necho \"::add-mask::$oidc\"\nsession=$(curl -sS --fail-with-body -X POST \"$DEPLOY_API/v1/deploys\" \\\n -H \"Authorization: Bearer $oidc\" -H 'Content-Type: application/json' \\\n --data-binary @\"$RUNNER_TEMP/manifest.json\") \\\n || { echo \"::error::deploy refused: $session\"; exit 1; }\nprintf '%s' \"$session\" > \"$RUNNER_TEMP/session.json\"\nDEPLOY_TOKEN=$(jq -r .token \"$RUNNER_TEMP/session.json\")\necho \"::add-mask::$DEPLOY_TOKEN\"\nDEPLOY_URL=\"$DEPLOY_API/v1/deploys/$(jq -r .id \"$RUNNER_TEMP/session.json\")\"\nexport DEPLOY_TOKEN DEPLOY_URL\nupload() {\n curl -sS --fail-with-body --retry 3 --retry-all-errors -T \"./$1\" \\\n -H \"Authorization: Bearer $DEPLOY_TOKEN\" -H 'Content-Type: application/octet-stream' \\\n \"$DEPLOY_URL/files/$(jq -rn --arg p \"$1\" '$p | split(\"/\") | map(@uri) | join(\"/\")')\"\n}\nexport -f upload\nif jq -e 'has(\"missing\")' \"$RUNNER_TEMP/session.json\" > /dev/null; then\n # Delta: upload only what changed; the API copies the rest from the live release.\n echo \"Delta deploy: $(jq '.missing | length' \"$RUNNER_TEMP/session.json\") to upload, $(jq '.reuse | length' \"$RUNNER_TEMP/session.json\") reused from the live release\"\n jq -r '.missing[]' \"$RUNNER_TEMP/session.json\" | tr '\\n' '\\0' | xargs -0 -P 8 -n 1 bash -c 'upload \"$1\"' _\n reuse_batch() {\n curl -sS --fail-with-body --retry 3 --retry-all-errors -X POST \\\n -H \"Authorization: Bearer $DEPLOY_TOKEN\" -H 'Content-Type: application/json' \\\n --data-binary \"$1\" \"$DEPLOY_URL/reuse\" -w \"reuse batch: HTTP %{http_code} in %{time_total}s\\n\"\n }\n export -f reuse_batch\n jq -c '.reuse as $r | if ($r | length) == 0 then empty else ($r | _nwise(100) | {paths: .}) end' \\\n \"$RUNNER_TEMP/session.json\" | tr '\\n' '\\0' | xargs -0 -P 8 -n 1 bash -c 'reuse_batch \"$1\"' _\nelse\n find . -type f -printf '%P\\0' | xargs -0 -P 8 -n 1 bash -c 'upload \"$1\"' _\nfi\ncurl -sS --fail-with-body -X POST -H \"Authorization: Bearer $DEPLOY_TOKEN\" \"$DEPLOY_URL/commit\"\necho\necho \"Deployed ${GITHUB_REPOSITORY##*/} from ${GITHUB_SHA::7}\"\n";
17
17
  export declare function deployWorkflow(config: StoreConfig): string;
18
18
  export declare function getArchetypeFiles(archetype: AppArchetype): Record<string, string>;
19
19
  export declare function getTemplateFiles(config: StoreConfig, archetype?: AppArchetype, preset?: AppPreset): Record<string, string>;
@@ -914,7 +914,7 @@ if jq -e 'has("missing")' "$RUNNER_TEMP/session.json" > /dev/null; then
914
914
  }
915
915
  export -f reuse_batch
916
916
  jq -c '.reuse as $r | if ($r | length) == 0 then empty else ($r | _nwise(100) | {paths: .}) end' \\
917
- "$RUNNER_TEMP/session.json" | tr '\\n' '\\0' | xargs -0 -P 3 -n 1 bash -c 'reuse_batch "$1"' _
917
+ "$RUNNER_TEMP/session.json" | tr '\\n' '\\0' | xargs -0 -P 8 -n 1 bash -c 'reuse_batch "$1"' _
918
918
  else
919
919
  find . -type f -printf '%P\\0' | xargs -0 -P 8 -n 1 bash -c 'upload "$1"' _
920
920
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@freeappstore/cli",
3
- "version": "0.4.97",
3
+ "version": "0.4.99",
4
4
  "description": "fas — CLI for publishing free apps to freeappstore.online",
5
5
  "license": "MIT",
6
6
  "type": "module",