@anvil-works/anvil-cli 0.8.0-canary.25 → 0.8.0-canary.27
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 +2 -0
- package/dist/cli.js +77 -8
- package/dist/commands/test.d.ts.map +1 -1
- package/dist/index.js +52 -6
- package/dist/serviceSources.d.ts.map +1 -1
- package/dist/services/git.d.ts +2 -1
- package/dist/services/git.d.ts.map +1 -1
- package/dist/validateThemeCss.d.ts +4 -0
- package/dist/validateThemeCss.d.ts.map +1 -0
- package/dist/validators.d.ts +2 -1
- package/dist/validators.d.ts.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -213,6 +213,7 @@ When given a file, the command chooses the validator from the file path. When gi
|
|
|
213
213
|
- `anvil.yaml`
|
|
214
214
|
- `.yaml` files under `client_code/`, including `client_code/**/form_template.yaml`
|
|
215
215
|
- `.html` files under `client_code/`, including `client_code/**/form_template.html` and module-form `client_code/<Form>.html`
|
|
216
|
+
- `.css` files under `theme/assets/`, including `theme.css`: warns about selectors targeting the removed `anvil-dropzone` wrappers. These warnings do not fail validation; general CSS syntax is not checked.
|
|
216
217
|
- `.py` files under `client_code/` and `server_code/`
|
|
217
218
|
|
|
218
219
|
Common examples:
|
|
@@ -225,6 +226,7 @@ anvil validate client_code/Form1/form_template.html
|
|
|
225
226
|
anvil validate client_code/Form1.html
|
|
226
227
|
anvil validate client_code/Helpers.py
|
|
227
228
|
anvil validate server_code/ServerModule.py
|
|
229
|
+
anvil validate theme/assets/theme.css
|
|
228
230
|
anvil validate .
|
|
229
231
|
```
|
|
230
232
|
|
package/dist/cli.js
CHANGED
|
@@ -7278,7 +7278,7 @@ var __webpack_modules__ = {
|
|
|
7278
7278
|
if (!valid) process.exitCode = 1;
|
|
7279
7279
|
}
|
|
7280
7280
|
function registerValidateCommand(program) {
|
|
7281
|
-
program.command("validate").description("Validate Anvil app files by path or directory (anvil.yaml, client_code/**/*.yaml, client_code/**/*.html, client_code/**/*.py, or
|
|
7281
|
+
program.command("validate").description("Validate Anvil app files by path or directory (anvil.yaml, client_code/**/*.yaml, client_code/**/*.html, client_code/**/*.py, server_code/**/*.py, or theme/assets/**/*.css)").argument("<path>", "Path to file or directory").action(async (file)=>{
|
|
7282
7282
|
let pathStat;
|
|
7283
7283
|
try {
|
|
7284
7284
|
pathStat = (0, fs__rspack_import_0.statSync)(file);
|
|
@@ -16883,6 +16883,8 @@ Examples:
|
|
|
16883
16883
|
USAGE_ERROR: 4,
|
|
16884
16884
|
NO_TESTS_COLLECTED: 5
|
|
16885
16885
|
};
|
|
16886
|
+
const SYNC_POLL_INTERVAL_MS = 250;
|
|
16887
|
+
const SYNC_TIMEOUT_MS = 15000;
|
|
16886
16888
|
class UsageError extends Error {
|
|
16887
16889
|
}
|
|
16888
16890
|
function toServerTestTarget(target, options) {
|
|
@@ -16901,6 +16903,15 @@ Examples:
|
|
|
16901
16903
|
throw new Error("HEAD isn't on a branch. Check out the branch you've pushed to Anvil.");
|
|
16902
16904
|
}
|
|
16903
16905
|
}
|
|
16906
|
+
async function waitForCleanTree(git) {
|
|
16907
|
+
const start = Date.now();
|
|
16908
|
+
if (!await git.hasUncommittedChanges()) return;
|
|
16909
|
+
src_logger.vF.info("Waiting for anvil watch to sync your uncommitted changes...");
|
|
16910
|
+
do {
|
|
16911
|
+
if (Date.now() - start >= SYNC_TIMEOUT_MS) throw new Error("You have uncommited local changes. Run anvil watch to sync them, or commit and push them, or use --allow-dirty to test without them.");
|
|
16912
|
+
await new Promise((resolve)=>setTimeout(resolve, SYNC_POLL_INTERVAL_MS));
|
|
16913
|
+
}while (await git.hasUncommittedChanges());
|
|
16914
|
+
}
|
|
16904
16915
|
async function runTestCommand(targets, options) {
|
|
16905
16916
|
const jsonMode = (0, globalConfig.JP)().jsonMode;
|
|
16906
16917
|
const controller = new AbortController();
|
|
@@ -16930,9 +16941,11 @@ Examples:
|
|
|
16930
16941
|
} : {}
|
|
16931
16942
|
};
|
|
16932
16943
|
const { appId, anvilUrl, username } = await resolveAppAccount(projectRoot, appAccountOptions(options));
|
|
16944
|
+
if (options.allowDirty) {
|
|
16945
|
+
if (await git.hasUncommittedChanges()) src_logger.vF.warn("You have uncommitted changes, which won't be included in the test run.");
|
|
16946
|
+
} else await waitForCleanTree(git);
|
|
16933
16947
|
const branch = await getBranch(git);
|
|
16934
16948
|
const commitId = await git.getCommitId();
|
|
16935
|
-
if (await git.hasUncommittedChanges()) src_logger.vF.warn("You have uncommitted changes, which won't be included in the test run.");
|
|
16936
16949
|
process.on("SIGINT", onInterrupt);
|
|
16937
16950
|
const { runId: completedRunId, state } = await runServerTests(appId, {
|
|
16938
16951
|
commitId,
|
|
@@ -16990,8 +17003,7 @@ Examples:
|
|
|
16990
17003
|
}
|
|
16991
17004
|
function registerTestCommand(program) {
|
|
16992
17005
|
if ("1" !== process.env.ANVIL_AGENT_HOST) return;
|
|
16993
|
-
addAppAccountOptions(program.command("test")).description("Run the app's tests on Anvil, against the commit you have checked out").argument("[targets...]", "Test paths or pytest node IDs, relative to your current directory").option("-k <expression>", "Only run tests that match the pytest keyword expression").option("--collect-only", "List the tests without running them").addHelpText("after", `
|
|
16994
|
-
The commit you have checked out must already be pushed to Anvil.
|
|
17006
|
+
addAppAccountOptions(program.command("test")).description("Run the app's tests on Anvil, against the commit you have checked out").argument("[targets...]", "Test paths or pytest node IDs, relative to your current directory").option("-k <expression>", "Only run tests that match the pytest keyword expression").option("--collect-only", "List the tests without running them").option("--allow-dirty", "Don't wait for uncommitted changes to sync").addHelpText("after", `
|
|
16995
17007
|
The exit code is the same as pytest: 0 if every test passed, 1 if any failed.
|
|
16996
17008
|
|
|
16997
17009
|
Examples:
|
|
@@ -17213,7 +17225,8 @@ Examples:
|
|
|
17213
17225
|
"/runtime/services/anvil/saml.yml",
|
|
17214
17226
|
"/runtime/services/anvil/microsoft.yml",
|
|
17215
17227
|
"/runtime/services/anvil/email.yml",
|
|
17216
|
-
"/runtime/services/anvil/files.yml"
|
|
17228
|
+
"/runtime/services/anvil/files.yml",
|
|
17229
|
+
"/runtime/services/anvil/tests.yml"
|
|
17217
17230
|
]);
|
|
17218
17231
|
},
|
|
17219
17232
|
"./src/services/anvil-api.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
@@ -18522,8 +18535,16 @@ Promise.resolve(executeGitCredentialOperation(process.argv[2] || "get", {
|
|
|
18522
18535
|
if ((511 & stat.mode) !== (511 & mode)) await fs__rspack_import_0.promises.chmod(filePath, mode);
|
|
18523
18536
|
}
|
|
18524
18537
|
async hasUncommittedChanges() {
|
|
18525
|
-
|
|
18526
|
-
|
|
18538
|
+
try {
|
|
18539
|
+
const status = await this.git.raw([
|
|
18540
|
+
"--no-optional-locks",
|
|
18541
|
+
"status",
|
|
18542
|
+
"--porcelain"
|
|
18543
|
+
]);
|
|
18544
|
+
return status.trim().length > 0;
|
|
18545
|
+
} catch (e) {
|
|
18546
|
+
throw _errors__rspack_import_6.N3.commandFailed("status", e.message);
|
|
18547
|
+
}
|
|
18527
18548
|
}
|
|
18528
18549
|
async fetch(url, refSpec) {
|
|
18529
18550
|
let attempt = 0;
|
|
@@ -19687,6 +19708,44 @@ print(json.dumps({"issues": issues}))
|
|
|
19687
19708
|
};
|
|
19688
19709
|
}
|
|
19689
19710
|
},
|
|
19711
|
+
"./src/validateThemeCss.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
19712
|
+
"use strict";
|
|
19713
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
19714
|
+
l: ()=>validateThemeCss
|
|
19715
|
+
});
|
|
19716
|
+
var _lezer_css__rspack_import_0 = __webpack_require__("@lezer/css");
|
|
19717
|
+
function validateThemeCss(source) {
|
|
19718
|
+
if (!/anvil-dropzone/i.test(source)) return [];
|
|
19719
|
+
const warnings = [];
|
|
19720
|
+
let line = 1;
|
|
19721
|
+
let lineStart = 0;
|
|
19722
|
+
let nextLineBreak = source.indexOf("\n");
|
|
19723
|
+
_lezer_css__rspack_import_0.parser.parse(source).iterate({
|
|
19724
|
+
enter (node) {
|
|
19725
|
+
if ("SelectorQuery" === node.name) return false;
|
|
19726
|
+
if ("TagName" !== node.name || node.node.parent?.name !== "TagSelector" || "anvil-dropzone" !== source.slice(node.from, node.to).toLowerCase()) return;
|
|
19727
|
+
while(-1 !== nextLineBreak && nextLineBreak < node.from){
|
|
19728
|
+
line += 1;
|
|
19729
|
+
lineStart = nextLineBreak + 1;
|
|
19730
|
+
nextLineBreak = source.indexOf("\n", lineStart);
|
|
19731
|
+
}
|
|
19732
|
+
const column = node.from - lineStart + 1;
|
|
19733
|
+
warnings.push({
|
|
19734
|
+
path: "anvil-dropzone",
|
|
19735
|
+
code: "anvil-dropzone-selector",
|
|
19736
|
+
message: "HtmlComponent no longer renders anvil-dropzone elements. Target a component class or its surrounding element instead.",
|
|
19737
|
+
line,
|
|
19738
|
+
column,
|
|
19739
|
+
endLine: line,
|
|
19740
|
+
endColumn: column + node.to - node.from,
|
|
19741
|
+
offset: node.from,
|
|
19742
|
+
endOffset: node.to
|
|
19743
|
+
});
|
|
19744
|
+
}
|
|
19745
|
+
});
|
|
19746
|
+
return warnings;
|
|
19747
|
+
}
|
|
19748
|
+
},
|
|
19690
19749
|
"./src/validators.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
19691
19750
|
"use strict";
|
|
19692
19751
|
__webpack_require__.d(__webpack_exports__, {
|
|
@@ -19706,6 +19765,7 @@ print(json.dumps({"issues": issues}))
|
|
|
19706
19765
|
var _serviceSources__rspack_import_6 = __webpack_require__("./src/serviceSources.ts");
|
|
19707
19766
|
var _validateFormTemplateHtml__rspack_import_7 = __webpack_require__("./src/validateFormTemplateHtml.ts");
|
|
19708
19767
|
var _validatePython__rspack_import_8 = __webpack_require__("./src/validatePython.ts");
|
|
19768
|
+
var _validateThemeCss__rspack_import_9 = __webpack_require__("./src/validateThemeCss.ts");
|
|
19709
19769
|
const IDENTIFIER_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
19710
19770
|
const DB_ACCESS_LEVELS = new Set([
|
|
19711
19771
|
"none",
|
|
@@ -20109,6 +20169,10 @@ print(json.dumps({"issues": issues}))
|
|
|
20109
20169
|
}
|
|
20110
20170
|
function inferValidationTarget(filePath) {
|
|
20111
20171
|
const normalizedPath = filePath.replace(/\\/g, "/");
|
|
20172
|
+
if (/(^|\/)theme\/assets\/.+\.css$/i.test(normalizedPath)) {
|
|
20173
|
+
const appRoot = (0, _appRoot__rspack_import_5.$)(filePath);
|
|
20174
|
+
if (!appRoot || path__rspack_import_1_default().relative(appRoot, filePath).replace(/\\/g, "/").startsWith("theme/assets/")) return "css";
|
|
20175
|
+
}
|
|
20112
20176
|
if ("anvil.yaml" === normalizedPath || normalizedPath.endsWith("/anvil.yaml")) return "anvil.yaml";
|
|
20113
20177
|
const clientCodePrefix = "client_code/";
|
|
20114
20178
|
if (normalizedPath.startsWith(clientCodePrefix) || normalizedPath.includes(`/${clientCodePrefix}`)) {
|
|
@@ -20145,6 +20209,7 @@ print(json.dumps({"issues": issues}))
|
|
|
20145
20209
|
}
|
|
20146
20210
|
]
|
|
20147
20211
|
};
|
|
20212
|
+
if ("css" === target) return validPathResult(target, (0, _validateThemeCss__rspack_import_9.l)(fileContent));
|
|
20148
20213
|
if ("anvil.yaml" === target) {
|
|
20149
20214
|
if (existingPath && appRoot && path__rspack_import_1_default().resolve(existingPath) !== path__rspack_import_1_default().join(appRoot, "anvil.yaml")) return {
|
|
20150
20215
|
ok: false,
|
|
@@ -20244,7 +20309,7 @@ print(json.dumps({"issues": issues}))
|
|
|
20244
20309
|
issues: [
|
|
20245
20310
|
{
|
|
20246
20311
|
path: "",
|
|
20247
|
-
message: "supported paths are anvil.yaml, client_code/**/form_template.yaml, client_code/**/*.yaml, client_code/**/*.html, client_code/**/*.py, and
|
|
20312
|
+
message: "supported paths are anvil.yaml, client_code/**/form_template.yaml, client_code/**/*.yaml, client_code/**/*.html, client_code/**/*.py, server_code/**/*.py, and theme/assets/**/*.css"
|
|
20248
20313
|
}
|
|
20249
20314
|
]
|
|
20250
20315
|
};
|
|
@@ -20254,6 +20319,10 @@ print(json.dumps({"issues": issues}))
|
|
|
20254
20319
|
"use strict";
|
|
20255
20320
|
module.exports = require("@anvil-works/form-template-parser");
|
|
20256
20321
|
},
|
|
20322
|
+
"@lezer/css" (module) {
|
|
20323
|
+
"use strict";
|
|
20324
|
+
module.exports = require("@lezer/css");
|
|
20325
|
+
},
|
|
20257
20326
|
"@napi-rs/keyring" (module) {
|
|
20258
20327
|
"use strict";
|
|
20259
20328
|
module.exports = require("@napi-rs/keyring");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../src/commands/test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../src/commands/test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4BpC,MAAM,WAAW,yBAAyB;IACtC,qEAAqE;IACrE,OAAO,EAAE,MAAM,CAAC;IAChB,kDAAkD;IAClD,GAAG,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,yBAAyB,GAAG,MAAM,CAU7F;AA6HD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAyB1D"}
|
package/dist/index.js
CHANGED
|
@@ -12054,7 +12054,7 @@ var __webpack_exports__ = {};
|
|
|
12054
12054
|
}
|
|
12055
12055
|
const interceptor = new Interceptor();
|
|
12056
12056
|
const whenExit = interceptor.register;
|
|
12057
|
-
const
|
|
12057
|
+
const dist_node = whenExit;
|
|
12058
12058
|
const temp_Temp = {
|
|
12059
12059
|
store: {},
|
|
12060
12060
|
create: (filePath)=>{
|
|
@@ -12097,7 +12097,7 @@ var __webpack_exports__ = {};
|
|
|
12097
12097
|
return `${filePath.slice(0, -basename.length)}${truncable[1]}${truncable[2].slice(0, -truncationLength)}${truncable[3]}`;
|
|
12098
12098
|
}
|
|
12099
12099
|
};
|
|
12100
|
-
|
|
12100
|
+
dist_node(temp_Temp.purgeSyncAll);
|
|
12101
12101
|
const temp = temp_Temp;
|
|
12102
12102
|
function writeFileSync(filePath, data, options = constants_DEFAULT_WRITE_OPTIONS) {
|
|
12103
12103
|
if (lang_isString(options)) return writeFileSync(filePath, data, {
|
|
@@ -14502,8 +14502,16 @@ Promise.resolve()
|
|
|
14502
14502
|
if ((511 & stat.mode) !== (511 & mode)) await external_fs_.promises.chmod(filePath, mode);
|
|
14503
14503
|
}
|
|
14504
14504
|
async hasUncommittedChanges() {
|
|
14505
|
-
|
|
14506
|
-
|
|
14505
|
+
try {
|
|
14506
|
+
const status = await this.git.raw([
|
|
14507
|
+
"--no-optional-locks",
|
|
14508
|
+
"status",
|
|
14509
|
+
"--porcelain"
|
|
14510
|
+
]);
|
|
14511
|
+
return status.trim().length > 0;
|
|
14512
|
+
} catch (e) {
|
|
14513
|
+
throw errors_createGitError.commandFailed("status", e.message);
|
|
14514
|
+
}
|
|
14507
14515
|
}
|
|
14508
14516
|
async fetch(url, refSpec) {
|
|
14509
14517
|
let attempt = 0;
|
|
@@ -16605,7 +16613,8 @@ Promise.resolve()
|
|
|
16605
16613
|
"/runtime/services/anvil/saml.yml",
|
|
16606
16614
|
"/runtime/services/anvil/microsoft.yml",
|
|
16607
16615
|
"/runtime/services/anvil/email.yml",
|
|
16608
|
-
"/runtime/services/anvil/files.yml"
|
|
16616
|
+
"/runtime/services/anvil/files.yml",
|
|
16617
|
+
"/runtime/services/anvil/tests.yml"
|
|
16609
16618
|
]);
|
|
16610
16619
|
const FRONTMATTER_ALLOWED_KEYS = new Set([
|
|
16611
16620
|
"custom_component",
|
|
@@ -16966,6 +16975,38 @@ print(json.dumps({"issues": issues}))
|
|
|
16966
16975
|
ok: true
|
|
16967
16976
|
};
|
|
16968
16977
|
}
|
|
16978
|
+
const css_namespaceObject = require("@lezer/css");
|
|
16979
|
+
function validateThemeCss(source) {
|
|
16980
|
+
if (!/anvil-dropzone/i.test(source)) return [];
|
|
16981
|
+
const warnings = [];
|
|
16982
|
+
let line = 1;
|
|
16983
|
+
let lineStart = 0;
|
|
16984
|
+
let nextLineBreak = source.indexOf("\n");
|
|
16985
|
+
css_namespaceObject.parser.parse(source).iterate({
|
|
16986
|
+
enter (node) {
|
|
16987
|
+
if ("SelectorQuery" === node.name) return false;
|
|
16988
|
+
if ("TagName" !== node.name || node.node.parent?.name !== "TagSelector" || "anvil-dropzone" !== source.slice(node.from, node.to).toLowerCase()) return;
|
|
16989
|
+
while(-1 !== nextLineBreak && nextLineBreak < node.from){
|
|
16990
|
+
line += 1;
|
|
16991
|
+
lineStart = nextLineBreak + 1;
|
|
16992
|
+
nextLineBreak = source.indexOf("\n", lineStart);
|
|
16993
|
+
}
|
|
16994
|
+
const column = node.from - lineStart + 1;
|
|
16995
|
+
warnings.push({
|
|
16996
|
+
path: "anvil-dropzone",
|
|
16997
|
+
code: "anvil-dropzone-selector",
|
|
16998
|
+
message: "HtmlComponent no longer renders anvil-dropzone elements. Target a component class or its surrounding element instead.",
|
|
16999
|
+
line,
|
|
17000
|
+
column,
|
|
17001
|
+
endLine: line,
|
|
17002
|
+
endColumn: column + node.to - node.from,
|
|
17003
|
+
offset: node.from,
|
|
17004
|
+
endOffset: node.to
|
|
17005
|
+
});
|
|
17006
|
+
}
|
|
17007
|
+
});
|
|
17008
|
+
return warnings;
|
|
17009
|
+
}
|
|
16969
17010
|
const validators_IDENTIFIER_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
16970
17011
|
const DB_ACCESS_LEVELS = new Set([
|
|
16971
17012
|
"none",
|
|
@@ -17369,6 +17410,10 @@ print(json.dumps({"issues": issues}))
|
|
|
17369
17410
|
}
|
|
17370
17411
|
function inferValidationTarget(filePath) {
|
|
17371
17412
|
const normalizedPath = filePath.replace(/\\/g, "/");
|
|
17413
|
+
if (/(^|\/)theme\/assets\/.+\.css$/i.test(normalizedPath)) {
|
|
17414
|
+
const appRoot = findAnvilAppRoot(filePath);
|
|
17415
|
+
if (!appRoot || external_path_default().relative(appRoot, filePath).replace(/\\/g, "/").startsWith("theme/assets/")) return "css";
|
|
17416
|
+
}
|
|
17372
17417
|
if ("anvil.yaml" === normalizedPath || normalizedPath.endsWith("/anvil.yaml")) return "anvil.yaml";
|
|
17373
17418
|
const clientCodePrefix = "client_code/";
|
|
17374
17419
|
if (normalizedPath.startsWith(clientCodePrefix) || normalizedPath.includes(`/${clientCodePrefix}`)) {
|
|
@@ -17405,6 +17450,7 @@ print(json.dumps({"issues": issues}))
|
|
|
17405
17450
|
}
|
|
17406
17451
|
]
|
|
17407
17452
|
};
|
|
17453
|
+
if ("css" === target) return validPathResult(target, validateThemeCss(fileContent));
|
|
17408
17454
|
if ("anvil.yaml" === target) {
|
|
17409
17455
|
if (existingPath && appRoot && external_path_default().resolve(existingPath) !== external_path_default().join(appRoot, "anvil.yaml")) return {
|
|
17410
17456
|
ok: false,
|
|
@@ -17504,7 +17550,7 @@ print(json.dumps({"issues": issues}))
|
|
|
17504
17550
|
issues: [
|
|
17505
17551
|
{
|
|
17506
17552
|
path: "",
|
|
17507
|
-
message: "supported paths are anvil.yaml, client_code/**/form_template.yaml, client_code/**/*.yaml, client_code/**/*.html, client_code/**/*.py, and
|
|
17553
|
+
message: "supported paths are anvil.yaml, client_code/**/form_template.yaml, client_code/**/*.yaml, client_code/**/*.html, client_code/**/*.py, server_code/**/*.py, and theme/assets/**/*.css"
|
|
17508
17554
|
}
|
|
17509
17555
|
]
|
|
17510
17556
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serviceSources.d.ts","sourceRoot":"","sources":["../src/serviceSources.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,6BAA6B,
|
|
1
|
+
{"version":3,"file":"serviceSources.d.ts","sourceRoot":"","sources":["../src/serviceSources.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,6BAA6B,aAcxC,CAAC"}
|
package/dist/services/git.d.ts
CHANGED
|
@@ -95,7 +95,8 @@ export declare class GitService extends Emitter<GitServiceEvents> {
|
|
|
95
95
|
private hasSameIndexContentAsHead;
|
|
96
96
|
private restoreExecutableBit;
|
|
97
97
|
/**
|
|
98
|
-
* Check for uncommitted changes.
|
|
98
|
+
* Check for uncommitted changes, including untracked files.
|
|
99
|
+
* Doesn't refresh the index, so it never holds the index lock while another process (such as watch) needs it.
|
|
99
100
|
* @throws {GitError} if git command fails
|
|
100
101
|
*/
|
|
101
102
|
hasUncommittedChanges(): Promise<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/services/git.ts"],"names":[],"mappings":"AAOA,OAAkB,EAAgB,SAAS,EAAE,MAAM,YAAY,CAAC;AAEhE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAA6B,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAahF,MAAM,WAAW,gBAAgB;IAC7B,oFAAoF;IACpF,aAAa,EAAE;QACX,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,gFAAgF;IAChF,sBAAsB,EAAE;QACpB,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,WAAW,GAAG,QAAQ,CAAC;KACnC,CAAC;CACL;AAED,MAAM,WAAW,SAAS;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,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AAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlD;;;OAGG;IACG,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ3C;;;OAGG;IACG,UAAU,IAAI,OAAO,CAAC,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAYvE;;OAEG;IACG,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC;IAK1C;;OAEG;IACG,sBAAsB,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CA+BtE;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAoD/G;AAED,wBAAsB,8BAA8B,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAwBpF;AASD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAE7D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateThemeCss.d.ts","sourceRoot":"","sources":["../src/validateThemeCss.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAGpD,0EAA0E;AAC1E,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,EAAE,CAsClE"}
|
package/dist/validators.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export type AnvilYamlValidationResult = {
|
|
|
32
32
|
issues: ValidationIssue[];
|
|
33
33
|
warnings?: ValidationIssue[];
|
|
34
34
|
};
|
|
35
|
-
export type ValidationTarget = "anvil.yaml" | "form_template.yaml" | "form_template.html" | "python";
|
|
35
|
+
export type ValidationTarget = "anvil.yaml" | "form_template.yaml" | "form_template.html" | "python" | "css";
|
|
36
36
|
export type ValidatePathResult = {
|
|
37
37
|
ok: true;
|
|
38
38
|
target: ValidationTarget;
|
|
@@ -64,6 +64,7 @@ export { inferValidationTarget };
|
|
|
64
64
|
* - any form YAML under `client_code/` with a `.yaml` suffix
|
|
65
65
|
* - any form HTML under `client_code/` with a `.html` suffix
|
|
66
66
|
* - any Python file under `client_code/` or `server_code/`
|
|
67
|
+
* - CSS files under `theme/assets/` (migration warnings only)
|
|
67
68
|
*/
|
|
68
69
|
export declare function validatePath(filePath: string, fileContent: string, options?: ValidatePathOptions): ValidatePathResult;
|
|
69
70
|
//# sourceMappingURL=validators.d.ts.map
|
package/dist/validators.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../src/validators.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../src/validators.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAQhF,MAAM,MAAM,eAAe,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CA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C;CACnD,CAAC;AAwEF,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,UAEhD;AAgBD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,4BAA4B,CA0BtF;AAqaD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,yBAAyB,CAkFhF;AAED,iBAAS,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAkCxE;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC;AAOjC;;;;;;;GAOG;AACH,wBAAgB,YAAY,CACxB,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,mBAAwB,GAClC,kBAAkB,CA0IpB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anvil-works/anvil-cli",
|
|
3
|
-
"version": "0.8.0-canary.
|
|
3
|
+
"version": "0.8.0-canary.27",
|
|
4
4
|
"description": "CLI tool for developing Anvil apps locally",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/api.d.ts",
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@anvil-works/anvil-ty": "0.1.0-canary.0",
|
|
68
68
|
"@anvil-works/form-template-parser": "0.0.5",
|
|
69
|
+
"@lezer/css": "^1.3.9",
|
|
69
70
|
"@napi-rs/keyring": "^1.2.0",
|
|
70
71
|
"@types/inquirer": "^9.0.9",
|
|
71
72
|
"@types/js-yaml": "^4.0.9",
|