@anvil-works/anvil-cli 0.7.3 → 0.7.4
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/dist/SavePathRouter.d.ts.map +1 -1
- package/dist/cli.js +14 -6
- package/dist/index.js +14 -6
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SavePathRouter.d.ts","sourceRoot":"","sources":["../src/SavePathRouter.ts"],"names":[],"mappings":"AAMA,OAAO,EAGH,KAAK,uBAAuB,EAE/B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAmB,MAAM,cAAc,CAAC;AAMlE,KAAK,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;AAG3B,MAAM,WAAW,UAAU;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,UAAU;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAChB;AACD,MAAM,MAAM,QAAQ,GAAG,uBAAuB,CAAC;AAE/C,MAAM,WAAW,SAAS;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACnB;AASD,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEhE,MAAM,MAAM,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,GAAG,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjH,MAAM,WAAW,YAAY;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC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U,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAwWD;;;GAGG;AACH,wBAAgB,sBAAsB,CAClC,OAAO,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GAC9F,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAgEtF;AAED,wBAAsB,eAAe,CACjC,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,YAAY,GACtB,OAAO,CAAC,UAAU,GAAG,UAAU,EAAE,CAAC,CAqBpC;AA8zBD;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CACrC,QAAQ,EAAE,MAAM,EAChB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,GAC1C,OAAO,CAAC,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,GAAG,CAAA;CAAE,CAAC,CAAC,CAiE7C"}
|
package/dist/cli.js
CHANGED
|
@@ -17068,6 +17068,10 @@ print(json.dumps({"issues": issues}))
|
|
|
17068
17068
|
function normalizeClientCodePath(relativePath) {
|
|
17069
17069
|
return relativePath.replace(/\\/g, "/");
|
|
17070
17070
|
}
|
|
17071
|
+
function isRootCodePackageMarkerPath(relativePath) {
|
|
17072
|
+
const normalized = relativePath.replace(/\\/g, "/");
|
|
17073
|
+
return "client_code/__init__.py" === normalized || "server_code/__init__.py" === normalized;
|
|
17074
|
+
}
|
|
17071
17075
|
function isServerRequirementsPath(relativePath) {
|
|
17072
17076
|
return "server_code/requirements.txt" === relativePath.replace(/\\/g, "/");
|
|
17073
17077
|
}
|
|
@@ -17163,8 +17167,12 @@ print(json.dumps({"issues": issues}))
|
|
|
17163
17167
|
const parts = relativePath.split("/");
|
|
17164
17168
|
if (2 === parts.length) return "scripts";
|
|
17165
17169
|
}
|
|
17166
|
-
if (relativePath.startsWith("server_code/") && relativePath.endsWith(".py"))
|
|
17170
|
+
if (relativePath.startsWith("server_code/") && relativePath.endsWith(".py")) {
|
|
17171
|
+
if (isRootCodePackageMarkerPath(relativePath)) return null;
|
|
17172
|
+
return "server_modules";
|
|
17173
|
+
}
|
|
17167
17174
|
if (relativePath.startsWith("client_code/") && relativePath.endsWith(".py")) {
|
|
17175
|
+
if (isRootCodePackageMarkerPath(relativePath)) return null;
|
|
17168
17176
|
const isPackageInit = relativePath.endsWith("__init__.py");
|
|
17169
17177
|
const kind = isPackageInit ? "package" : "module";
|
|
17170
17178
|
const className = extractPythonName(relativePath);
|
|
@@ -17379,11 +17387,11 @@ print(json.dumps({"issues": issues}))
|
|
|
17379
17387
|
handle: handleScriptsChange
|
|
17380
17388
|
},
|
|
17381
17389
|
{
|
|
17382
|
-
matches: (relativePath)=>relativePath.startsWith("server_code/") && relativePath.endsWith(".py"),
|
|
17390
|
+
matches: (relativePath)=>relativePath.startsWith("server_code/") && relativePath.endsWith(".py") && !isRootCodePackageMarkerPath(relativePath),
|
|
17383
17391
|
handle: handleServerCodeChange
|
|
17384
17392
|
},
|
|
17385
17393
|
{
|
|
17386
|
-
matches: (relativePath)=>relativePath.startsWith("client_code/") && relativePath.endsWith(".py"),
|
|
17394
|
+
matches: (relativePath)=>relativePath.startsWith("client_code/") && relativePath.endsWith(".py") && !isRootCodePackageMarkerPath(relativePath),
|
|
17387
17395
|
handle: handleClientCodeChange
|
|
17388
17396
|
},
|
|
17389
17397
|
{
|
|
@@ -17919,7 +17927,7 @@ print(json.dumps({"issues": issues}))
|
|
|
17919
17927
|
const DELETION_ROUTES = [
|
|
17920
17928
|
{
|
|
17921
17929
|
matches: (relativePath, editorYaml)=>{
|
|
17922
|
-
if (!relativePath.startsWith("client_code/") || !relativePath.endsWith(".py")) return false;
|
|
17930
|
+
if (!relativePath.startsWith("client_code/") || !relativePath.endsWith(".py") || isRootCodePackageMarkerPath(relativePath)) return false;
|
|
17923
17931
|
const className = extractPythonName(relativePath);
|
|
17924
17932
|
return editorYaml.hasId("forms", className);
|
|
17925
17933
|
},
|
|
@@ -17931,7 +17939,7 @@ print(json.dumps({"issues": issues}))
|
|
|
17931
17939
|
},
|
|
17932
17940
|
{
|
|
17933
17941
|
matches: (relativePath, editorYaml)=>{
|
|
17934
|
-
if (!relativePath.startsWith("client_code/") || !relativePath.endsWith(".py")) return false;
|
|
17942
|
+
if (!relativePath.startsWith("client_code/") || !relativePath.endsWith(".py") || isRootCodePackageMarkerPath(relativePath)) return false;
|
|
17935
17943
|
const className = extractPythonName(relativePath);
|
|
17936
17944
|
return !editorYaml.hasId("forms", className);
|
|
17937
17945
|
},
|
|
@@ -17954,7 +17962,7 @@ print(json.dumps({"issues": issues}))
|
|
|
17954
17962
|
]
|
|
17955
17963
|
},
|
|
17956
17964
|
{
|
|
17957
|
-
matches: (relativePath)=>relativePath.startsWith("server_code/") && relativePath.endsWith(".py"),
|
|
17965
|
+
matches: (relativePath)=>relativePath.startsWith("server_code/") && relativePath.endsWith(".py") && !isRootCodePackageMarkerPath(relativePath),
|
|
17958
17966
|
entityType: "server_modules",
|
|
17959
17967
|
extractName: extractPythonName,
|
|
17960
17968
|
savePathPrefix: [
|
package/dist/index.js
CHANGED
|
@@ -17097,6 +17097,10 @@ print(json.dumps({"issues": issues}))
|
|
|
17097
17097
|
function normalizeClientCodePath(relativePath) {
|
|
17098
17098
|
return relativePath.replace(/\\/g, "/");
|
|
17099
17099
|
}
|
|
17100
|
+
function isRootCodePackageMarkerPath(relativePath) {
|
|
17101
|
+
const normalized = relativePath.replace(/\\/g, "/");
|
|
17102
|
+
return "client_code/__init__.py" === normalized || "server_code/__init__.py" === normalized;
|
|
17103
|
+
}
|
|
17100
17104
|
function isServerRequirementsPath(relativePath) {
|
|
17101
17105
|
return "server_code/requirements.txt" === relativePath.replace(/\\/g, "/");
|
|
17102
17106
|
}
|
|
@@ -17192,8 +17196,12 @@ print(json.dumps({"issues": issues}))
|
|
|
17192
17196
|
const parts = relativePath.split("/");
|
|
17193
17197
|
if (2 === parts.length) return "scripts";
|
|
17194
17198
|
}
|
|
17195
|
-
if (relativePath.startsWith("server_code/") && relativePath.endsWith(".py"))
|
|
17199
|
+
if (relativePath.startsWith("server_code/") && relativePath.endsWith(".py")) {
|
|
17200
|
+
if (isRootCodePackageMarkerPath(relativePath)) return null;
|
|
17201
|
+
return "server_modules";
|
|
17202
|
+
}
|
|
17196
17203
|
if (relativePath.startsWith("client_code/") && relativePath.endsWith(".py")) {
|
|
17204
|
+
if (isRootCodePackageMarkerPath(relativePath)) return null;
|
|
17197
17205
|
const isPackageInit = relativePath.endsWith("__init__.py");
|
|
17198
17206
|
const kind = isPackageInit ? "package" : "module";
|
|
17199
17207
|
const className = extractPythonName(relativePath);
|
|
@@ -17408,11 +17416,11 @@ print(json.dumps({"issues": issues}))
|
|
|
17408
17416
|
handle: handleScriptsChange
|
|
17409
17417
|
},
|
|
17410
17418
|
{
|
|
17411
|
-
matches: (relativePath)=>relativePath.startsWith("server_code/") && relativePath.endsWith(".py"),
|
|
17419
|
+
matches: (relativePath)=>relativePath.startsWith("server_code/") && relativePath.endsWith(".py") && !isRootCodePackageMarkerPath(relativePath),
|
|
17412
17420
|
handle: handleServerCodeChange
|
|
17413
17421
|
},
|
|
17414
17422
|
{
|
|
17415
|
-
matches: (relativePath)=>relativePath.startsWith("client_code/") && relativePath.endsWith(".py"),
|
|
17423
|
+
matches: (relativePath)=>relativePath.startsWith("client_code/") && relativePath.endsWith(".py") && !isRootCodePackageMarkerPath(relativePath),
|
|
17416
17424
|
handle: handleClientCodeChange
|
|
17417
17425
|
},
|
|
17418
17426
|
{
|
|
@@ -17948,7 +17956,7 @@ print(json.dumps({"issues": issues}))
|
|
|
17948
17956
|
const DELETION_ROUTES = [
|
|
17949
17957
|
{
|
|
17950
17958
|
matches: (relativePath, editorYaml)=>{
|
|
17951
|
-
if (!relativePath.startsWith("client_code/") || !relativePath.endsWith(".py")) return false;
|
|
17959
|
+
if (!relativePath.startsWith("client_code/") || !relativePath.endsWith(".py") || isRootCodePackageMarkerPath(relativePath)) return false;
|
|
17952
17960
|
const className = extractPythonName(relativePath);
|
|
17953
17961
|
return editorYaml.hasId("forms", className);
|
|
17954
17962
|
},
|
|
@@ -17960,7 +17968,7 @@ print(json.dumps({"issues": issues}))
|
|
|
17960
17968
|
},
|
|
17961
17969
|
{
|
|
17962
17970
|
matches: (relativePath, editorYaml)=>{
|
|
17963
|
-
if (!relativePath.startsWith("client_code/") || !relativePath.endsWith(".py")) return false;
|
|
17971
|
+
if (!relativePath.startsWith("client_code/") || !relativePath.endsWith(".py") || isRootCodePackageMarkerPath(relativePath)) return false;
|
|
17964
17972
|
const className = extractPythonName(relativePath);
|
|
17965
17973
|
return !editorYaml.hasId("forms", className);
|
|
17966
17974
|
},
|
|
@@ -17983,7 +17991,7 @@ print(json.dumps({"issues": issues}))
|
|
|
17983
17991
|
]
|
|
17984
17992
|
},
|
|
17985
17993
|
{
|
|
17986
|
-
matches: (relativePath)=>relativePath.startsWith("server_code/") && relativePath.endsWith(".py"),
|
|
17994
|
+
matches: (relativePath)=>relativePath.startsWith("server_code/") && relativePath.endsWith(".py") && !isRootCodePackageMarkerPath(relativePath),
|
|
17987
17995
|
entityType: "server_modules",
|
|
17988
17996
|
extractName: extractPythonName,
|
|
17989
17997
|
savePathPrefix: [
|