@rebasepro/cli 0.23.0 → 0.24.1-canary.g19596ef
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.
- package/README.md +19 -3
- package/bin/rebase.js +4 -1
- package/dist/agent-setup-B31F00DC.js +324 -0
- package/dist/agent-setup-B31F00DC.js.map +1 -0
- package/dist/api-keys-Bl1I9q7M.js +525 -0
- package/dist/api-keys-Bl1I9q7M.js.map +1 -0
- package/dist/apps-CNgQJjg5.js +340 -0
- package/dist/apps-CNgQJjg5.js.map +1 -0
- package/dist/args-BnmsEXvu.js +109 -0
- package/dist/args-BnmsEXvu.js.map +1 -0
- package/dist/atlas-dev-database-D_LP_Woq.js +62 -0
- package/dist/atlas-dev-database-D_LP_Woq.js.map +1 -0
- package/dist/auth-aySHEF45.js +414 -0
- package/dist/auth-aySHEF45.js.map +1 -0
- package/dist/branch-pointer-DvSHBjjz.js +2 -0
- package/dist/build-DIHWIqO4.js +336 -0
- package/dist/build-DIHWIqO4.js.map +1 -0
- package/dist/bundle-CqURVN-K.js +1621 -0
- package/dist/bundle-CqURVN-K.js.map +1 -0
- package/dist/bundle.d.ts +12 -3
- package/dist/cli.d.ts +23 -2
- package/dist/cloud-DjByQlkW.js +9667 -0
- package/dist/cloud-DjByQlkW.js.map +1 -0
- package/dist/collection-drift-BKj_BoMq.js +106 -0
- package/dist/collection-drift-BKj_BoMq.js.map +1 -0
- package/dist/commands/__test_support__/parser-specs.d.ts +13 -0
- package/dist/commands/agent-setup.d.ts +116 -0
- package/dist/commands/api-keys.d.ts +86 -23
- package/dist/commands/apps.d.ts +17 -0
- package/dist/commands/auth.d.ts +7 -0
- package/dist/commands/build.d.ts +5 -1
- package/dist/commands/cloud/auth.d.ts +4 -3
- package/dist/commands/cloud/bundle-deploy.d.ts +45 -0
- package/dist/commands/cloud/context.d.ts +44 -5
- package/dist/commands/cloud/cron.d.ts +53 -0
- package/dist/commands/cloud/debug.d.ts +134 -0
- package/dist/commands/cloud/index.d.ts +89 -12
- package/dist/commands/cloud/token-capabilities.d.ts +76 -0
- package/dist/commands/cloud/tokens.d.ts +23 -0
- package/dist/commands/console.d.ts +12 -0
- package/dist/commands/db.d.ts +79 -25
- package/dist/commands/dev.d.ts +181 -13
- package/dist/commands/doctor.d.ts +5 -0
- package/dist/commands/generate_sdk.d.ts +29 -2
- package/dist/commands/init.d.ts +115 -14
- package/dist/commands/schema.d.ts +6 -0
- package/dist/commands/skills.d.ts +126 -7
- package/dist/commands/start.d.ts +44 -0
- package/dist/commands/storage.d.ts +46 -0
- package/dist/commands/upgrade.d.ts +1 -0
- package/dist/consent-ClRHmcxf.js +76 -0
- package/dist/consent-ClRHmcxf.js.map +1 -0
- package/dist/console-D6SJf8k_.js +102 -0
- package/dist/console-D6SJf8k_.js.map +1 -0
- package/dist/context-BqhRydBg.js +1234 -0
- package/dist/context-BqhRydBg.js.map +1 -0
- package/dist/{daemon-entry-LTFKtpHy.js → daemon-entry-Da-D3rmH.js} +3 -4
- package/dist/daemon-entry-Da-D3rmH.js.map +1 -0
- package/dist/daemon-pzsQwDHa.js +2 -0
- package/dist/db-B7RuNuaQ.js +1312 -0
- package/dist/db-B7RuNuaQ.js.map +1 -0
- package/dist/derive-Dl0z2OWi.js +484 -0
- package/dist/derive-Dl0z2OWi.js.map +1 -0
- package/dist/dev-CYr_WXan.js +1599 -0
- package/dist/dev-CYr_WXan.js.map +1 -0
- package/dist/dev-db/atlas-dev-database.d.ts +32 -0
- package/dist/dev-db/daemon-entry.d.ts +13 -0
- package/dist/dev-db/daemon.d.ts +10 -0
- package/dist/dev-db/last-dev-database.d.ts +41 -0
- package/dist/dev-db/prepare.d.ts +29 -3
- package/dist/dev-db/pull.d.ts +90 -5
- package/dist/dev-db/resolve.d.ts +26 -2
- package/dist/dev-preflight-B-LYyBf1.js +2 -0
- package/dist/dev-server-DG8Tt-uf.js +96 -0
- package/dist/dev-server-DG8Tt-uf.js.map +1 -0
- package/dist/doctor-BP8cZ-7F.js +771 -0
- package/dist/doctor-BP8cZ-7F.js.map +1 -0
- package/dist/eject-DizdoecV.js +335 -0
- package/dist/eject-DizdoecV.js.map +1 -0
- package/dist/fold-static-BC9CYicw.js +201 -0
- package/dist/fold-static-BC9CYicw.js.map +1 -0
- package/dist/fold-static.d.ts +26 -3
- package/dist/function-portability-BIvlvR9q.js +265 -0
- package/dist/function-portability-BIvlvR9q.js.map +1 -0
- package/dist/generate_sdk-BPqdJc3Q.js +489 -0
- package/dist/generate_sdk-BPqdJc3Q.js.map +1 -0
- package/dist/index.es.js +199 -22095
- package/dist/index.es.js.map +1 -1
- package/dist/init-Utstvh2Q.js +1149 -0
- package/dist/init-Utstvh2Q.js.map +1 -0
- package/dist/last-dev-database-B58g89uA.js +2 -0
- package/dist/manifest-DRp0UVTj.js +880 -0
- package/dist/manifest-DRp0UVTj.js.map +1 -0
- package/dist/manifest.d.ts +56 -4
- package/dist/normalize-imports-X0Tgze9y.js +107 -0
- package/dist/normalize-imports-X0Tgze9y.js.map +1 -0
- package/dist/package-manager-DSEOwTqM.js +193 -0
- package/dist/package-manager-DSEOwTqM.js.map +1 -0
- package/dist/path-flags-BFgG9V6y.js +91 -0
- package/dist/path-flags-BFgG9V6y.js.map +1 -0
- package/dist/precompress.d.ts +17 -0
- package/dist/prepare-CDN6lSpz.js +1236 -0
- package/dist/prepare-CDN6lSpz.js.map +1 -0
- package/dist/{project-3WCbrrfW.js → project-Wp2zoyeN.js} +34 -184
- package/dist/project-Wp2zoyeN.js.map +1 -0
- package/dist/pull-CrGYMEsy.js +458 -0
- package/dist/pull-CrGYMEsy.js.map +1 -0
- package/dist/resolve-B2O-wKKk.js +2 -0
- package/dist/resources-FD7AfZx8.js +183 -0
- package/dist/resources-FD7AfZx8.js.map +1 -0
- package/dist/schema-DMdr431S.js +125 -0
- package/dist/schema-DMdr431S.js.map +1 -0
- package/dist/skills-DTFibT1m.js +642 -0
- package/dist/skills-DTFibT1m.js.map +1 -0
- package/dist/start-DEa-hOBh.js +267 -0
- package/dist/start-DEa-hOBh.js.map +1 -0
- package/dist/{state-C59Elrnt.js → state-Do7ZJYkF.js} +49 -4
- package/dist/state-Do7ZJYkF.js.map +1 -0
- package/dist/status-DxnJTekv.js +352 -0
- package/dist/status-DxnJTekv.js.map +1 -0
- package/dist/storage-DyVq-f_F.js +303 -0
- package/dist/storage-DyVq-f_F.js.map +1 -0
- package/dist/telemetry/identity.d.ts +10 -1
- package/dist/telemetry-C8Uq8phb.js +129 -0
- package/dist/telemetry-C8Uq8phb.js.map +1 -0
- package/dist/telemetry-EMFRVRQi.js +351 -0
- package/dist/telemetry-EMFRVRQi.js.map +1 -0
- package/dist/unknown-command-DNwDcX3w.js +98 -0
- package/dist/unknown-command-DNwDcX3w.js.map +1 -0
- package/dist/upgrade-CtZtRkTE.js +1332 -0
- package/dist/upgrade-CtZtRkTE.js.map +1 -0
- package/dist/upgrade.d.ts +38 -5
- package/dist/utils/dev-preflight.d.ts +47 -5
- package/dist/utils/dev-server.d.ts +30 -0
- package/dist/utils/path-flags.d.ts +31 -0
- package/dist/utils/project.d.ts +16 -0
- package/dist/utils/temp-archive.d.ts +9 -0
- package/dist/version-Buyyo1ut.js +58 -0
- package/dist/version-Buyyo1ut.js.map +1 -0
- package/package.json +7 -7
- package/templates/eject/Dockerfile +4 -2
- package/templates/eject/backend/src/env.ts +1 -1
- package/templates/eject/backend/src/index.ts +42 -4
- package/templates/eject/docker-compose.custom.yml +8 -4
- package/templates/generated-schemas/blank.ts +40 -0
- package/templates/generated-schemas/blog.ts +127 -0
- package/templates/generated-schemas/ecommerce.ts +93 -0
- package/templates/overlays/baas/ai-instructions.md +1 -1
- package/templates/overlays/baas/config/package.json +1 -0
- package/templates/overlays/baas/config/storage.ts +5 -3
- package/templates/overlays/baas/package.json +1 -0
- package/templates/template/.cursorrules +1 -1
- package/templates/template/.env.example +20 -10
- package/templates/template/.github/copilot-instructions.md +1 -1
- package/templates/template/.mcp.json +2 -2
- package/templates/template/.windsurfrules +1 -1
- package/templates/template/AGENTS.md +1 -1
- package/templates/template/CLAUDE.md +1 -1
- package/templates/template/README.md +21 -15
- package/templates/template/ai-instructions.md +5 -4
- package/templates/template/backend/functions/hello.ts +8 -0
- package/templates/template/backend/package.json +1 -1
- package/templates/template/config/resources.ts +7 -6
- package/templates/template/config/storage.ts +5 -3
- package/templates/template/docker-compose.yml +15 -9
- package/templates/template/frontend/vite.config.ts +13 -3
- package/templates/template/gitignore +6 -1
- package/templates/template/package.json +5 -3
- package/templates/template/scripts/example.ts +6 -4
- package/templates/template/tsconfig.json +25 -0
- package/dist/branch-pointer-dBiClJ0p.js +0 -111
- package/dist/branch-pointer-dBiClJ0p.js.map +0 -1
- package/dist/constraints-DKGbNfUW.js +0 -48
- package/dist/constraints-DKGbNfUW.js.map +0 -1
- package/dist/daemon-DR9Tk0La.js +0 -355
- package/dist/daemon-DR9Tk0La.js.map +0 -1
- package/dist/daemon-entry-LTFKtpHy.js.map +0 -1
- package/dist/dev-preflight-CNLl4rdo.js +0 -367
- package/dist/dev-preflight-CNLl4rdo.js.map +0 -1
- package/dist/project-3WCbrrfW.js.map +0 -1
- package/dist/pull-Dywm5FWP.js +0 -232
- package/dist/pull-Dywm5FWP.js.map +0 -1
- package/dist/resolve-BAeRUBhg.js +0 -74
- package/dist/resolve-BAeRUBhg.js.map +0 -1
- package/dist/state-C59Elrnt.js.map +0 -1
- package/templates/template/backend/src/schema.generated.ts +0 -13
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import chalk from "chalk";
|
|
2
|
+
import fs from "fs";
|
|
3
|
+
import path from "path";
|
|
4
|
+
//#region src/utils/path-flags.ts
|
|
5
|
+
/**
|
|
6
|
+
* Where a path typed on a `rebase` command line resolves: one rule, one sentence.
|
|
7
|
+
*
|
|
8
|
+
* The driver CLI runs with `cwd: backend/` — that is where it and its
|
|
9
|
+
* dependencies resolve from — while people type commands from the project root
|
|
10
|
+
* (or anywhere else in it). So every relative path on the line is resolved by
|
|
11
|
+
* the CLI, from the directory the command was run in, before the driver is
|
|
12
|
+
* handed a different one (`absolutizeLocalPathArgs` in `commands/db.ts`).
|
|
13
|
+
* `generate-sdk` and `db backup --out` already worked that way; `--collections`
|
|
14
|
+
* was resolved from `backend/` and was the odd one out.
|
|
15
|
+
*
|
|
16
|
+
* The sentence below is printed by every help page that takes `--collections`,
|
|
17
|
+
* and by the refusal when the path is not there, so the rule is stated in one
|
|
18
|
+
* set of words wherever a reader meets it.
|
|
19
|
+
*/
|
|
20
|
+
/** The rule, as every help page and error states it. */
|
|
21
|
+
var COLLECTIONS_PATH_RULE = "relative paths are resolved from where you run the command";
|
|
22
|
+
/** The `--collections` line of a help page. */
|
|
23
|
+
var COLLECTIONS_FLAG_HELP = `Collections directory (default: config/collections); ${COLLECTIONS_PATH_RULE}`;
|
|
24
|
+
/** The flags that carry a collections path, in every spelling the driver accepts. */
|
|
25
|
+
var COLLECTIONS_FLAGS = ["--collections", "-c"];
|
|
26
|
+
/** The `--collections` value on a line, as typed, or `null` when there is none. */
|
|
27
|
+
function typedCollectionsPath(args) {
|
|
28
|
+
for (let i = 0; i < args.length; i++) {
|
|
29
|
+
const token = args[i];
|
|
30
|
+
const eq = token.indexOf("=");
|
|
31
|
+
if (eq > 0 && COLLECTIONS_FLAGS.includes(token.slice(0, eq))) return token.slice(eq + 1) || null;
|
|
32
|
+
if (COLLECTIONS_FLAGS.includes(token)) {
|
|
33
|
+
const value = args[i + 1];
|
|
34
|
+
return value && !value.startsWith("-") ? value : null;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* What a refusal over a missing `--collections` path spared, by what the command
|
|
41
|
+
* would have done with it. Only a schema writer drops tables; a console or a
|
|
42
|
+
* doctor run over nothing does something else wrong, and says so.
|
|
43
|
+
*/
|
|
44
|
+
var MISSING_COLLECTIONS_CONSEQUENCE = {
|
|
45
|
+
schema: [
|
|
46
|
+
"Nothing was generated and nothing was applied — a schema generated from a",
|
|
47
|
+
"directory that is not there is an empty one, and applying it would drop",
|
|
48
|
+
"every table it does not describe."
|
|
49
|
+
],
|
|
50
|
+
console: ["Nothing was started — a console over a directory that is not there would", "load none of this project's collections."],
|
|
51
|
+
doctor: ["Nothing was checked — a directory that is not there has no collections, so", "every collection check would pass over it."]
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* The refusal for a `--collections` path that does not exist, or `null`.
|
|
55
|
+
*
|
|
56
|
+
* Checked by the CLI, in the reader's terms, before the driver is spawned: the
|
|
57
|
+
* driver's own check runs in `backend/` and can only describe the path it was
|
|
58
|
+
* handed. A generator pointed at a directory that is not there writes an empty
|
|
59
|
+
* schema, and a push of an empty schema drops every table — so nothing runs.
|
|
60
|
+
*
|
|
61
|
+
* Scripts written for the old rule (`--collections ../config/collections`,
|
|
62
|
+
* run from the root) land here, and the message says exactly what to change.
|
|
63
|
+
*/
|
|
64
|
+
function missingCollectionsPath(args, cwd, backendDir, use = "schema") {
|
|
65
|
+
const typed = typedCollectionsPath(args);
|
|
66
|
+
if (typed === null) return null;
|
|
67
|
+
const resolved = path.resolve(cwd, typed);
|
|
68
|
+
if (fs.existsSync(resolved)) return null;
|
|
69
|
+
const lines = [
|
|
70
|
+
chalk.red(`✗ Collections path not found: "${typed}"`),
|
|
71
|
+
chalk.gray(` Resolved to: ${resolved}`),
|
|
72
|
+
chalk.gray(` (${COLLECTIONS_PATH_RULE}: ${cwd})`)
|
|
73
|
+
];
|
|
74
|
+
const fromBackend = path.resolve(backendDir, typed);
|
|
75
|
+
if (!path.isAbsolute(typed) && fs.existsSync(fromBackend)) lines.push("", chalk.yellow(` From backend/ it would be ${fromBackend} — the driver used to resolve paths from there.`), chalk.yellow(` Leave the flag out (config/collections is the default), or write it from here: ${path.relative(cwd, fromBackend) || "."}`));
|
|
76
|
+
lines.push("", ...MISSING_COLLECTIONS_CONSEQUENCE[use].map((line) => chalk.gray(` ${line}`)));
|
|
77
|
+
return lines;
|
|
78
|
+
}
|
|
79
|
+
/** Print {@link missingCollectionsPath}'s refusal and exit 1, or return. */
|
|
80
|
+
function refuseMissingCollectionsPath(args, cwd, backendDir, use = "schema") {
|
|
81
|
+
const lines = missingCollectionsPath(args, cwd, backendDir, use);
|
|
82
|
+
if (!lines) return;
|
|
83
|
+
console.error("");
|
|
84
|
+
for (const line of lines) console.error(line);
|
|
85
|
+
console.error("");
|
|
86
|
+
process.exit(1);
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
export { COLLECTIONS_PATH_RULE as n, refuseMissingCollectionsPath as r, COLLECTIONS_FLAG_HELP as t };
|
|
90
|
+
|
|
91
|
+
//# sourceMappingURL=path-flags-BFgG9V6y.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-flags-BFgG9V6y.js","names":[],"sources":["../src/utils/path-flags.ts"],"sourcesContent":["/**\n * Where a path typed on a `rebase` command line resolves: one rule, one sentence.\n *\n * The driver CLI runs with `cwd: backend/` — that is where it and its\n * dependencies resolve from — while people type commands from the project root\n * (or anywhere else in it). So every relative path on the line is resolved by\n * the CLI, from the directory the command was run in, before the driver is\n * handed a different one (`absolutizeLocalPathArgs` in `commands/db.ts`).\n * `generate-sdk` and `db backup --out` already worked that way; `--collections`\n * was resolved from `backend/` and was the odd one out.\n *\n * The sentence below is printed by every help page that takes `--collections`,\n * and by the refusal when the path is not there, so the rule is stated in one\n * set of words wherever a reader meets it.\n */\nimport fs from \"fs\";\nimport path from \"path\";\nimport chalk from \"chalk\";\n\n/** The rule, as every help page and error states it. */\nexport const COLLECTIONS_PATH_RULE = \"relative paths are resolved from where you run the command\";\n\n/** The `--collections` line of a help page. */\nexport const COLLECTIONS_FLAG_HELP = `Collections directory (default: config/collections); ${COLLECTIONS_PATH_RULE}`;\n\n/** The flags that carry a collections path, in every spelling the driver accepts. */\nconst COLLECTIONS_FLAGS = [\"--collections\", \"-c\"];\n\n/** The `--collections` value on a line, as typed, or `null` when there is none. */\nfunction typedCollectionsPath(args: readonly string[]): string | null {\n for (let i = 0; i < args.length; i++) {\n const token = args[i];\n const eq = token.indexOf(\"=\");\n if (eq > 0 && COLLECTIONS_FLAGS.includes(token.slice(0, eq))) return token.slice(eq + 1) || null;\n if (COLLECTIONS_FLAGS.includes(token)) {\n const value = args[i + 1];\n return value && !value.startsWith(\"-\") ? value : null;\n }\n }\n return null;\n}\n\n/**\n * What a refusal over a missing `--collections` path spared, by what the command\n * would have done with it. Only a schema writer drops tables; a console or a\n * doctor run over nothing does something else wrong, and says so.\n */\nconst MISSING_COLLECTIONS_CONSEQUENCE = {\n schema: [\n \"Nothing was generated and nothing was applied — a schema generated from a\",\n \"directory that is not there is an empty one, and applying it would drop\",\n \"every table it does not describe.\"\n ],\n console: [\n \"Nothing was started — a console over a directory that is not there would\",\n \"load none of this project's collections.\"\n ],\n doctor: [\n \"Nothing was checked — a directory that is not there has no collections, so\",\n \"every collection check would pass over it.\"\n ]\n} as const;\n\n/** What a command does with its `--collections` path. */\nexport type CollectionsPathUse = keyof typeof MISSING_COLLECTIONS_CONSEQUENCE;\n\n/**\n * The refusal for a `--collections` path that does not exist, or `null`.\n *\n * Checked by the CLI, in the reader's terms, before the driver is spawned: the\n * driver's own check runs in `backend/` and can only describe the path it was\n * handed. A generator pointed at a directory that is not there writes an empty\n * schema, and a push of an empty schema drops every table — so nothing runs.\n *\n * Scripts written for the old rule (`--collections ../config/collections`,\n * run from the root) land here, and the message says exactly what to change.\n */\nexport function missingCollectionsPath(\n args: readonly string[],\n cwd: string,\n backendDir: string,\n use: CollectionsPathUse = \"schema\"\n): string[] | null {\n const typed = typedCollectionsPath(args);\n if (typed === null) return null;\n const resolved = path.resolve(cwd, typed);\n if (fs.existsSync(resolved)) return null;\n\n const lines = [\n chalk.red(`✗ Collections path not found: \"${typed}\"`),\n chalk.gray(` Resolved to: ${resolved}`),\n chalk.gray(` (${COLLECTIONS_PATH_RULE}: ${cwd})`)\n ];\n const fromBackend = path.resolve(backendDir, typed);\n if (!path.isAbsolute(typed) && fs.existsSync(fromBackend)) {\n lines.push(\n \"\",\n chalk.yellow(` From backend/ it would be ${fromBackend} — the driver used to resolve paths from there.`),\n chalk.yellow(` Leave the flag out (config/collections is the default), or write it from here: ${path.relative(cwd, fromBackend) || \".\"}`)\n );\n }\n lines.push(\"\", ...MISSING_COLLECTIONS_CONSEQUENCE[use].map(line => chalk.gray(` ${line}`)));\n return lines;\n}\n\n/** Print {@link missingCollectionsPath}'s refusal and exit 1, or return. */\nexport function refuseMissingCollectionsPath(\n args: readonly string[],\n cwd: string,\n backendDir: string,\n use: CollectionsPathUse = \"schema\"\n): void {\n const lines = missingCollectionsPath(args, cwd, backendDir, use);\n if (!lines) return;\n console.error(\"\");\n for (const line of lines) console.error(line);\n console.error(\"\");\n process.exit(1);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoBA,IAAa,wBAAwB;;AAGrC,IAAa,wBAAwB,wDAAwD;;AAG7F,IAAM,oBAAoB,CAAC,iBAAiB,IAAI;;AAGhD,SAAS,qBAAqB,MAAwC;CAClE,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;EAClC,MAAM,QAAQ,KAAK;EACnB,MAAM,KAAK,MAAM,QAAQ,GAAG;EAC5B,IAAI,KAAK,KAAK,kBAAkB,SAAS,MAAM,MAAM,GAAG,EAAE,CAAC,GAAG,OAAO,MAAM,MAAM,KAAK,CAAC,KAAK;EAC5F,IAAI,kBAAkB,SAAS,KAAK,GAAG;GACnC,MAAM,QAAQ,KAAK,IAAI;GACvB,OAAO,SAAS,CAAC,MAAM,WAAW,GAAG,IAAI,QAAQ;EACrD;CACJ;CACA,OAAO;AACX;;;;;;AAOA,IAAM,kCAAkC;CACpC,QAAQ;EACJ;EACA;EACA;CACJ;CACA,SAAS,CACL,4EACA,0CACJ;CACA,QAAQ,CACJ,8EACA,4CACJ;AACJ;;;;;;;;;;;;AAgBA,SAAgB,uBACZ,MACA,KACA,YACA,MAA0B,UACX;CACf,MAAM,QAAQ,qBAAqB,IAAI;CACvC,IAAI,UAAU,MAAM,OAAO;CAC3B,MAAM,WAAW,KAAK,QAAQ,KAAK,KAAK;CACxC,IAAI,GAAG,WAAW,QAAQ,GAAG,OAAO;CAEpC,MAAM,QAAQ;EACV,MAAM,IAAI,kCAAkC,MAAM,EAAE;EACpD,MAAM,KAAK,oBAAoB,UAAU;EACzC,MAAM,KAAK,QAAQ,sBAAsB,IAAI,IAAI,EAAE;CACvD;CACA,MAAM,cAAc,KAAK,QAAQ,YAAY,KAAK;CAClD,IAAI,CAAC,KAAK,WAAW,KAAK,KAAK,GAAG,WAAW,WAAW,GACpD,MAAM,KACF,IACA,MAAM,OAAO,+BAA+B,YAAY,gDAAgD,GACxG,MAAM,OAAO,oFAAoF,KAAK,SAAS,KAAK,WAAW,KAAK,KAAK,CAC7I;CAEJ,MAAM,KAAK,IAAI,GAAG,gCAAgC,IAAI,CAAC,KAAI,SAAQ,MAAM,KAAK,KAAK,MAAM,CAAC,CAAC;CAC3F,OAAO;AACX;;AAGA,SAAgB,6BACZ,MACA,KACA,YACA,MAA0B,UACtB;CACJ,MAAM,QAAQ,uBAAuB,MAAM,KAAK,YAAY,GAAG;CAC/D,IAAI,CAAC,OAAO;CACZ,QAAQ,MAAM,EAAE;CAChB,KAAK,MAAM,QAAQ,OAAO,QAAQ,MAAM,IAAI;CAC5C,QAAQ,MAAM,EAAE;CAChB,QAAQ,KAAK,CAAC;AAClB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A content hash in the name, by the runtime's rule (`isContentHashed` in the
|
|
3
|
+
* server's `serve-spa.ts`): 8+ base64url characters after the last `-` with a
|
|
4
|
+
* digit or a capital in them. `index-vgugiqRO.js` is; `vendor-analytics.js` is
|
|
5
|
+
* not.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isContentHashedName(fileName: string): boolean;
|
|
8
|
+
export interface PrecompressOutcome {
|
|
9
|
+
/** Files that got at least one sibling. */
|
|
10
|
+
files: number;
|
|
11
|
+
/** Their total size, and their siblings'. */
|
|
12
|
+
bytes: number;
|
|
13
|
+
brotliBytes: number;
|
|
14
|
+
gzipBytes: number;
|
|
15
|
+
}
|
|
16
|
+
/** Write `.br` and `.gz` siblings for every hashed, compressible asset under `dir`. */
|
|
17
|
+
export declare function precompressStaticAssets(dir: string): PrecompressOutcome;
|