@arcgis/create 5.1.0-next.21 → 5.1.0-next.22
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 +26 -28
- package/dist/init.js +161 -156
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,42 +1,40 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ArcGIS Maps SDK for JavaScript - Create CLI
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
- [Usage](#usage)
|
|
6
|
-
- [Commands](#commands)
|
|
3
|
+
The ArcGIS Maps SDK for JavaScript provides this CLI tool to streamline the process of creating a new web mapping application.
|
|
7
4
|
|
|
8
5
|
## Usage
|
|
9
6
|
|
|
10
|
-
The package is
|
|
11
|
-
|
|
12
|
-
1. run via npm init
|
|
7
|
+
The package is compatible with the [npm init command](https://docs.npmjs.com/cli/v8/commands/npm-init).
|
|
13
8
|
|
|
14
|
-
|
|
9
|
+
To get started, run `npm init @arcgis`, and you will be immediately prompted to initialize a new ArcGIS web application, or run using [npx](https://docs.npmjs.com/cli/v8/commands/npx):
|
|
15
10
|
|
|
16
|
-
|
|
11
|
+
```bash
|
|
12
|
+
npx @arcgis/create
|
|
13
|
+
# Initializes a new React application named "my-arcgis-app"
|
|
14
|
+
npx @arcgis/create -n my-arcgis-app -t react
|
|
15
|
+
```
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
- `npx @arcgis/create -- -n my-app -t react`
|
|
17
|
+
## CLI options
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
```bash
|
|
20
|
+
-n, --name <name> Name of the project
|
|
21
|
+
-t, --template <template> Template to use (react, vite, cdn, vue, angular, etc.)
|
|
22
|
+
```
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
## Resources
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
- [ArcGIS blog](https://blogs.esri.com/esri/arcgis/tag/javascript/)
|
|
27
|
+
- [System Requirements](https://developers.arcgis.com/javascript/latest/system-requirements/)
|
|
28
|
+
- [Terms of Use](https://www.esri.com/en-us/legal/terms/product-specific-scope-of-use)
|
|
29
|
+
- [Licensing](https://developers.arcgis.com/javascript/latest/licensing/)
|
|
30
|
+
- [Working with `next` versions](https://github.com/Esri/feedback-js-api-next/blob/main/README.md)
|
|
26
31
|
|
|
27
|
-
|
|
32
|
+
## Issues
|
|
28
33
|
|
|
29
|
-
|
|
30
|
-
|
|
34
|
+
- General questions about using this package or the ArcGIS Maps SDK for JavaScript? See the [Esri developer community](https://community.esri.com/t5/arcgis-api-for-javascript/ct-p/arcgis-api-for-javascript).
|
|
35
|
+
- [Technical support](https://support.esri.com/).
|
|
31
36
|
|
|
32
|
-
|
|
33
|
-
-V, --version output the version number
|
|
34
|
-
-n, --name <name> Name of the project
|
|
35
|
-
-t, --template <template> Template to use (react, angular, vanilla, vite, vue, or webpack)
|
|
36
|
-
-p, --packages <packages> Additional packages to add (charts, coding)
|
|
37
|
-
-h, --help display help for command
|
|
37
|
+
## License
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
help [command] display help for command
|
|
42
|
-
```
|
|
39
|
+
This package is licensed under the terms described in the `LICENSE.md` file, located in the root of the package, and at https://js.arcgis.com/5.0/LICENSE.txt.
|
|
40
|
+
For third party notices, see https://js.arcgis.com/5.0/third-party-notices.txt.
|
package/dist/init.js
CHANGED
|
@@ -1677,10 +1677,10 @@ Expecting one of '${w.join("', '")}'`);
|
|
|
1677
1677
|
const R = m.resolve(N, I);
|
|
1678
1678
|
if (g.existsSync(R)) return R;
|
|
1679
1679
|
if (y.includes(m.extname(I))) return;
|
|
1680
|
-
const
|
|
1680
|
+
const q = y.find(
|
|
1681
1681
|
(D) => g.existsSync(`${R}${D}`)
|
|
1682
1682
|
);
|
|
1683
|
-
if (
|
|
1683
|
+
if (q) return `${R}${q}`;
|
|
1684
1684
|
}
|
|
1685
1685
|
this._checkForMissingMandatoryOptions(), this._checkForConflictingOptions();
|
|
1686
1686
|
let C = r._executableFile || `${this._name}-${r._name}`, E = this._executableDir || "";
|
|
@@ -2612,9 +2612,9 @@ const Da = /* @__PURE__ */ Mt(Ma), {
|
|
|
2612
2612
|
Argument: Df,
|
|
2613
2613
|
Option: Ff,
|
|
2614
2614
|
Help: Bf
|
|
2615
|
-
} = Da, Ba = "5.1.0-next.
|
|
2615
|
+
} = Da, Ba = "5.1.0-next.22", qa = {
|
|
2616
2616
|
version: Ba
|
|
2617
|
-
},
|
|
2617
|
+
}, F = {
|
|
2618
2618
|
react: "react",
|
|
2619
2619
|
vite: "vite",
|
|
2620
2620
|
cdn: "cdn",
|
|
@@ -2623,7 +2623,8 @@ const Da = /* @__PURE__ */ Mt(Ma), {
|
|
|
2623
2623
|
node: "node",
|
|
2624
2624
|
webpack: "webpack",
|
|
2625
2625
|
geometryOperatorWorker: "geometry-operator-worker",
|
|
2626
|
-
aiComponentsCustomAgentToolsReact: "ai-components-custom-agent-tools-react",
|
|
2626
|
+
aiComponentsCustomAgentToolsReact: "ai-components-custom-agent-tools-react (beta)",
|
|
2627
|
+
aiComponentsCustomAgentHilReact: "ai-components-custom-agent-hil-react (beta)",
|
|
2627
2628
|
codingComponentsAngular: "coding-components-angular",
|
|
2628
2629
|
codingComponentsReact: "coding-components-react",
|
|
2629
2630
|
codingComponentsVite: "coding-components-vite",
|
|
@@ -2634,71 +2635,75 @@ const Da = /* @__PURE__ */ Mt(Ma), {
|
|
|
2634
2635
|
webGisSdk: "web-gis-sdk"
|
|
2635
2636
|
}, Ga = {
|
|
2636
2637
|
[_n.webGisSdk]: {
|
|
2637
|
-
[
|
|
2638
|
-
[
|
|
2639
|
-
[
|
|
2640
|
-
[
|
|
2641
|
-
[
|
|
2642
|
-
[
|
|
2643
|
-
[
|
|
2644
|
-
[
|
|
2645
|
-
[
|
|
2646
|
-
[
|
|
2647
|
-
[
|
|
2648
|
-
[
|
|
2649
|
-
[
|
|
2650
|
-
|
|
2651
|
-
}
|
|
2638
|
+
[F.angular]: "templates/js-maps-sdk-angular",
|
|
2639
|
+
[F.cdn]: "templates/js-maps-sdk-cdn",
|
|
2640
|
+
[F.node]: "templates/js-maps-sdk-node",
|
|
2641
|
+
[F.react]: "templates/js-maps-sdk-react",
|
|
2642
|
+
[F.vite]: "templates/js-maps-sdk-vite",
|
|
2643
|
+
[F.vue]: "templates/js-maps-sdk-vue",
|
|
2644
|
+
[F.webpack]: "templates/js-maps-sdk-webpack",
|
|
2645
|
+
[F.disconnectedEnvironment]: "templates/disconnected-environment",
|
|
2646
|
+
[F.geometryOperatorWorker]: "templates/geometry-operator-worker",
|
|
2647
|
+
[F.aiComponentsCustomAgentToolsReact]: "templates/ai-components-custom-agent-tools-react",
|
|
2648
|
+
[F.aiComponentsCustomAgentHilReact]: "templates/ai-components-custom-agent-hil-react",
|
|
2649
|
+
[F.codingComponentsAngular]: "templates/coding-components-angular",
|
|
2650
|
+
[F.codingComponentsReact]: "templates/coding-components-react",
|
|
2651
|
+
[F.codingComponentsVite]: "templates/coding-components-vite"
|
|
2652
|
+
}
|
|
2653
|
+
}, se = {
|
|
2652
2654
|
codeSample: "CODE_SAMPLE",
|
|
2653
2655
|
appSample: "APP_SAMPLE"
|
|
2654
2656
|
}, mo = "github.com", Nn = "main", go = {
|
|
2655
|
-
[
|
|
2656
|
-
[
|
|
2657
|
-
[
|
|
2658
|
-
[
|
|
2659
|
-
[
|
|
2660
|
-
[
|
|
2661
|
-
[
|
|
2662
|
-
[
|
|
2663
|
-
[
|
|
2664
|
-
[
|
|
2665
|
-
[
|
|
2666
|
-
[
|
|
2667
|
-
[
|
|
2657
|
+
[F.angular]: "Esri/jsapi-resources",
|
|
2658
|
+
[F.cdn]: "Esri/jsapi-resources",
|
|
2659
|
+
[F.node]: "Esri/jsapi-resources",
|
|
2660
|
+
[F.react]: "Esri/jsapi-resources",
|
|
2661
|
+
[F.vite]: "Esri/jsapi-resources",
|
|
2662
|
+
[F.vue]: "Esri/jsapi-resources",
|
|
2663
|
+
[F.webpack]: "Esri/jsapi-resources",
|
|
2664
|
+
[F.codingComponentsAngular]: "Esri/jsapi-resources",
|
|
2665
|
+
[F.codingComponentsReact]: "Esri/jsapi-resources",
|
|
2666
|
+
[F.codingComponentsVite]: "Esri/jsapi-resources",
|
|
2667
|
+
[F.disconnectedEnvironment]: "Esri/jsapi-resources",
|
|
2668
|
+
[F.geometryOperatorWorker]: "Esri/jsapi-resources",
|
|
2669
|
+
[F.aiComponentsCustomAgentToolsReact]: "Esri/jsapi-resources",
|
|
2670
|
+
[F.aiComponentsCustomAgentHilReact]: "Esri/jsapi-resources",
|
|
2668
2671
|
// code sample templates
|
|
2669
|
-
[
|
|
2672
|
+
[F.luminaComponents]: "WebGIS/arcgis-web-components"
|
|
2670
2673
|
}, ja = {
|
|
2671
|
-
[
|
|
2672
|
-
[
|
|
2673
|
-
[
|
|
2674
|
-
[
|
|
2675
|
-
[
|
|
2676
|
-
[
|
|
2677
|
-
[
|
|
2678
|
-
[
|
|
2679
|
-
[
|
|
2680
|
-
[
|
|
2681
|
-
[
|
|
2682
|
-
[
|
|
2683
|
-
[
|
|
2684
|
-
[
|
|
2674
|
+
[F.angular]: "templates/js-maps-sdk-angular",
|
|
2675
|
+
[F.cdn]: "templates/js-maps-sdk-cdn",
|
|
2676
|
+
[F.node]: "templates/js-maps-sdk-node",
|
|
2677
|
+
[F.react]: "templates/js-maps-sdk-react",
|
|
2678
|
+
[F.vite]: "templates/js-maps-sdk-vite",
|
|
2679
|
+
[F.vue]: "templates/js-maps-sdk-vue",
|
|
2680
|
+
[F.webpack]: "templates/js-maps-sdk-webpack",
|
|
2681
|
+
[F.codingComponentsAngular]: "templates/coding-components-angular",
|
|
2682
|
+
[F.codingComponentsReact]: "templates/coding-components-react",
|
|
2683
|
+
[F.codingComponentsVite]: "templates/coding-components-vite",
|
|
2684
|
+
[F.disconnectedEnvironment]: "templates/disconnected-environment",
|
|
2685
|
+
[F.geometryOperatorWorker]: "templates/geometry-operator-worker",
|
|
2686
|
+
[F.aiComponentsCustomAgentToolsReact]: "templates/ai-components-custom-agent-tools-react",
|
|
2687
|
+
[F.aiComponentsCustomAgentHilReact]: "templates/ai-components-custom-agent-hil-react",
|
|
2688
|
+
[F.luminaComponents]: "packages/starter-packages/lumina-components"
|
|
2685
2689
|
}, Ua = {
|
|
2686
|
-
[
|
|
2687
|
-
[
|
|
2688
|
-
[
|
|
2689
|
-
[
|
|
2690
|
-
[
|
|
2691
|
-
[
|
|
2692
|
-
[
|
|
2693
|
-
[
|
|
2694
|
-
[
|
|
2695
|
-
[
|
|
2696
|
-
[
|
|
2697
|
-
[
|
|
2698
|
-
[
|
|
2699
|
-
[
|
|
2690
|
+
[F.angular]: se.appSample,
|
|
2691
|
+
[F.cdn]: se.appSample,
|
|
2692
|
+
[F.node]: se.appSample,
|
|
2693
|
+
[F.react]: se.appSample,
|
|
2694
|
+
[F.vite]: se.appSample,
|
|
2695
|
+
[F.vue]: se.appSample,
|
|
2696
|
+
[F.webpack]: se.appSample,
|
|
2697
|
+
[F.codingComponentsAngular]: se.appSample,
|
|
2698
|
+
[F.codingComponentsReact]: se.appSample,
|
|
2699
|
+
[F.codingComponentsVite]: se.appSample,
|
|
2700
|
+
[F.disconnectedEnvironment]: se.appSample,
|
|
2701
|
+
[F.geometryOperatorWorker]: se.appSample,
|
|
2702
|
+
[F.aiComponentsCustomAgentToolsReact]: se.appSample,
|
|
2703
|
+
[F.aiComponentsCustomAgentHilReact]: se.appSample,
|
|
2704
|
+
[F.luminaComponents]: se.codeSample
|
|
2700
2705
|
}, Ha = {
|
|
2701
|
-
[
|
|
2706
|
+
[F.luminaComponents]: !0
|
|
2702
2707
|
};
|
|
2703
2708
|
var ft = { exports: {} }, ss;
|
|
2704
2709
|
function Va() {
|
|
@@ -2806,7 +2811,7 @@ function Ya() {
|
|
|
2806
2811
|
};
|
|
2807
2812
|
return Xt = { cursor: g, scroll: f, erase: n, beep: m }, Xt;
|
|
2808
2813
|
}
|
|
2809
|
-
var
|
|
2814
|
+
var re = Ya();
|
|
2810
2815
|
function kt(e, p, m) {
|
|
2811
2816
|
if (!m.some((s) => !s.disabled)) return e;
|
|
2812
2817
|
const g = e + p, f = Math.max(m.length - 1, 0), n = g < 0 ? f : g > f ? 0 : g;
|
|
@@ -2978,7 +2983,7 @@ function cl({ input: e = fo, output: p = On, overwrite: m = !0, hideCursor: g =
|
|
|
2978
2983
|
const n = (s, { name: a, sequence: o }) => {
|
|
2979
2984
|
const h = String(s);
|
|
2980
2985
|
if (kn([h, a, o], "cancel")) {
|
|
2981
|
-
g && p.write(
|
|
2986
|
+
g && p.write(re.cursor.show), process.exit(0);
|
|
2982
2987
|
return;
|
|
2983
2988
|
}
|
|
2984
2989
|
if (!m) return;
|
|
@@ -2989,8 +2994,8 @@ function cl({ input: e = fo, output: p = On, overwrite: m = !0, hideCursor: g =
|
|
|
2989
2994
|
});
|
|
2990
2995
|
});
|
|
2991
2996
|
};
|
|
2992
|
-
return g && p.write(
|
|
2993
|
-
e.off("keypress", n), g && p.write(
|
|
2997
|
+
return g && p.write(re.cursor.hide), e.once("keypress", n), () => {
|
|
2998
|
+
e.off("keypress", n), g && p.write(re.cursor.show), e instanceof Jn && e.isTTY && !ll && e.setRawMode(!1), f.terminal = !1, f.close();
|
|
2994
2999
|
};
|
|
2995
3000
|
}
|
|
2996
3001
|
const Tn = (e) => "columns" in e && typeof e.columns == "number" ? e.columns : 80, Co = (e) => "rows" in e && typeof e.rows == "number" ? e.rows : 20;
|
|
@@ -3046,9 +3051,9 @@ let xn = class {
|
|
|
3046
3051
|
}, { once: !0 });
|
|
3047
3052
|
}
|
|
3048
3053
|
this.rl = Ea.createInterface({ input: this.input, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: !0 }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, !0), this.input.on("keypress", this.onKeypress), mt(this.input, !0), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
|
|
3049
|
-
this.output.write(
|
|
3054
|
+
this.output.write(re.cursor.show), this.output.off("resize", this.render), mt(this.input, !1), p(this.value);
|
|
3050
3055
|
}), this.once("cancel", () => {
|
|
3051
|
-
this.output.write(
|
|
3056
|
+
this.output.write(re.cursor.show), this.output.off("resize", this.render), mt(this.input, !1), p(Sn);
|
|
3052
3057
|
});
|
|
3053
3058
|
});
|
|
3054
3059
|
}
|
|
@@ -3081,12 +3086,12 @@ let xn = class {
|
|
|
3081
3086
|
restoreCursor() {
|
|
3082
3087
|
const p = vn(this._prevFrame, process.stdout.columns, { hard: !0, trim: !1 }).split(`
|
|
3083
3088
|
`).length - 1;
|
|
3084
|
-
this.output.write(
|
|
3089
|
+
this.output.write(re.cursor.move(-999, p * -1));
|
|
3085
3090
|
}
|
|
3086
3091
|
render() {
|
|
3087
3092
|
const p = vn(this._render(this) ?? "", process.stdout.columns, { hard: !0, trim: !1 });
|
|
3088
3093
|
if (p !== this._prevFrame) {
|
|
3089
|
-
if (this.state === "initial") this.output.write(
|
|
3094
|
+
if (this.state === "initial") this.output.write(re.cursor.hide);
|
|
3090
3095
|
else {
|
|
3091
3096
|
const m = al(this._prevFrame, p), g = Co(this.output);
|
|
3092
3097
|
if (this.restoreCursor(), m) {
|
|
@@ -3097,18 +3102,18 @@ let xn = class {
|
|
|
3097
3102
|
return;
|
|
3098
3103
|
}
|
|
3099
3104
|
if (m.lines.length === 1) {
|
|
3100
|
-
this.output.write(
|
|
3105
|
+
this.output.write(re.cursor.move(0, s - n)), this.output.write(re.erase.lines(1));
|
|
3101
3106
|
const a = p.split(`
|
|
3102
3107
|
`);
|
|
3103
|
-
this.output.write(a[s]), this._prevFrame = p, this.output.write(
|
|
3108
|
+
this.output.write(a[s]), this._prevFrame = p, this.output.write(re.cursor.move(0, a.length - s - 1));
|
|
3104
3109
|
return;
|
|
3105
3110
|
} else if (m.lines.length > 1) {
|
|
3106
3111
|
if (f < n) s = f;
|
|
3107
3112
|
else {
|
|
3108
3113
|
const o = s - n;
|
|
3109
|
-
o > 0 && this.output.write(
|
|
3114
|
+
o > 0 && this.output.write(re.cursor.move(0, o));
|
|
3110
3115
|
}
|
|
3111
|
-
this.output.write(
|
|
3116
|
+
this.output.write(re.erase.down());
|
|
3112
3117
|
const a = p.split(`
|
|
3113
3118
|
`).slice(s);
|
|
3114
3119
|
this.output.write(a.join(`
|
|
@@ -3116,7 +3121,7 @@ let xn = class {
|
|
|
3116
3121
|
return;
|
|
3117
3122
|
}
|
|
3118
3123
|
}
|
|
3119
|
-
this.output.write(
|
|
3124
|
+
this.output.write(re.erase.down());
|
|
3120
3125
|
}
|
|
3121
3126
|
this.output.write(p), this.state === "initial" && (this.state = "active"), this._prevFrame = p;
|
|
3122
3127
|
}
|
|
@@ -3379,7 +3384,7 @@ const Ml = (e, p, m, g, f) => {
|
|
|
3379
3384
|
}
|
|
3380
3385
|
if (w > l) {
|
|
3381
3386
|
let E = 0, $ = 0, _ = w;
|
|
3382
|
-
const N = p - y, I = (R,
|
|
3387
|
+
const N = p - y, I = (R, q) => Ml(b, _, R, q, l);
|
|
3383
3388
|
d ? ({ lineCount: _, removals: E } = I(0, N), _ > l && ({ lineCount: _, removals: $ } = I(N + 1, b.length))) : ({ lineCount: _, removals: $ } = I(N + 1, b.length), _ > l && ({ lineCount: _, removals: E } = I(0, N))), E > 0 && (d = !0, b.splice(0, E)), $ > 0 && (v = !0, b.splice(b.length - $, $));
|
|
3384
3389
|
}
|
|
3385
3390
|
const C = [];
|
|
@@ -3468,8 +3473,8 @@ ${s}
|
|
|
3468
3473
|
const h = dl();
|
|
3469
3474
|
let i, t, l = !1, c = !1, u = "", d, v = performance.now();
|
|
3470
3475
|
const r = Tn(m), b = o?.styleFrame ?? Gl, w = (D) => {
|
|
3471
|
-
const
|
|
3472
|
-
c = D === 1, l && (B
|
|
3476
|
+
const B = D > 1 ? f ?? ve.messages.error : g ?? ve.messages.cancel;
|
|
3477
|
+
c = D === 1, l && (q(B, D), c && typeof p == "function" && p());
|
|
3473
3478
|
}, y = () => w(2), S = () => w(1), C = () => {
|
|
3474
3479
|
process.on("uncaughtExceptionMonitor", y), process.on("unhandledRejection", y), process.on("SIGINT", S), process.on("SIGTERM", S), process.on("exit", w), a && a.addEventListener("abort", S);
|
|
3475
3480
|
}, E = () => {
|
|
@@ -3480,18 +3485,18 @@ ${s}
|
|
|
3480
3485
|
`);
|
|
3481
3486
|
const D = Cn(d, r, { hard: !0, trim: !1 }).split(`
|
|
3482
3487
|
`);
|
|
3483
|
-
D.length > 1 && m.write(
|
|
3488
|
+
D.length > 1 && m.write(re.cursor.up(D.length - 1)), m.write(re.cursor.to(0)), m.write(re.erase.down());
|
|
3484
3489
|
}, _ = (D) => D.replace(/\.+$/, ""), N = (D) => {
|
|
3485
|
-
const
|
|
3490
|
+
const B = (performance.now() - D) / 1e3, G = Math.floor(B / 60), k = Math.floor(B % 60);
|
|
3486
3491
|
return G > 0 ? `[${G}m ${k}s]` : `[${k}s]`;
|
|
3487
3492
|
}, I = o.withGuide ?? ve.withGuide, R = (D = "") => {
|
|
3488
3493
|
l = !0, i = cl({ output: m }), u = _(D), v = performance.now(), I && m.write(`${x.gray(J)}
|
|
3489
3494
|
`);
|
|
3490
|
-
let
|
|
3495
|
+
let B = 0, G = 0;
|
|
3491
3496
|
C(), t = setInterval(() => {
|
|
3492
3497
|
if (h && u === d) return;
|
|
3493
3498
|
$(), d = u;
|
|
3494
|
-
const k = b(n[
|
|
3499
|
+
const k = b(n[B]);
|
|
3495
3500
|
let Y;
|
|
3496
3501
|
if (h) Y = `${k} ${u}...`;
|
|
3497
3502
|
else if (e === "timer") Y = `${k} ${u} ${N(v)}`;
|
|
@@ -3500,19 +3505,19 @@ ${s}
|
|
|
3500
3505
|
Y = `${k} ${u}${U}`;
|
|
3501
3506
|
}
|
|
3502
3507
|
const j = Cn(Y, r, { hard: !0, trim: !1 });
|
|
3503
|
-
m.write(j),
|
|
3508
|
+
m.write(j), B = B + 1 < n.length ? B + 1 : 0, G = G < 4 ? G + 0.125 : 0;
|
|
3504
3509
|
}, s);
|
|
3505
|
-
},
|
|
3510
|
+
}, q = (D = "", B = 0, G = !1) => {
|
|
3506
3511
|
if (!l) return;
|
|
3507
3512
|
l = !1, clearInterval(t), $();
|
|
3508
|
-
const k =
|
|
3513
|
+
const k = B === 0 ? x.green(Rn) : B === 1 ? x.red(Eo) : x.red(Ao);
|
|
3509
3514
|
u = D ?? u, G || (e === "timer" ? m.write(`${k} ${u} ${N(v)}
|
|
3510
3515
|
`) : m.write(`${k} ${u}
|
|
3511
3516
|
`)), E(), i();
|
|
3512
3517
|
};
|
|
3513
|
-
return { start: R, stop: (D = "") =>
|
|
3518
|
+
return { start: R, stop: (D = "") => q(D, 0), message: (D = "") => {
|
|
3514
3519
|
u = _(D ?? u);
|
|
3515
|
-
}, cancel: (D = "") =>
|
|
3520
|
+
}, cancel: (D = "") => q(D, 1), error: (D = "") => q(D, 2), clear: () => q("", 0, !0), get isCancelled() {
|
|
3516
3521
|
return c;
|
|
3517
3522
|
} };
|
|
3518
3523
|
}, vt = (e, p) => e.includes(`
|
|
@@ -4019,14 +4024,14 @@ function oc() {
|
|
|
4019
4024
|
},
|
|
4020
4025
|
toPercentageRgb: function() {
|
|
4021
4026
|
return {
|
|
4022
|
-
r: Math.round(
|
|
4023
|
-
g: Math.round(
|
|
4024
|
-
b: Math.round(
|
|
4027
|
+
r: Math.round(B(this._r, 255) * 100) + "%",
|
|
4028
|
+
g: Math.round(B(this._g, 255) * 100) + "%",
|
|
4029
|
+
b: Math.round(B(this._b, 255) * 100) + "%",
|
|
4025
4030
|
a: this._a
|
|
4026
4031
|
};
|
|
4027
4032
|
},
|
|
4028
4033
|
toPercentageRgbString: function() {
|
|
4029
|
-
return this._a == 1 ? "rgb(" + Math.round(
|
|
4034
|
+
return this._a == 1 ? "rgb(" + Math.round(B(this._r, 255) * 100) + "%, " + Math.round(B(this._g, 255) * 100) + "%, " + Math.round(B(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(B(this._r, 255) * 100) + "%, " + Math.round(B(this._g, 255) * 100) + "%, " + Math.round(B(this._b, 255) * 100) + "%, " + this._roundA + ")";
|
|
4030
4035
|
},
|
|
4031
4036
|
toName: function() {
|
|
4032
4037
|
return this._a === 0 ? "transparent" : this._a < 1 ? !1 : R[l(this._r, this._g, this._b, !0)] || !1;
|
|
@@ -4124,13 +4129,13 @@ function oc() {
|
|
|
4124
4129
|
}
|
|
4125
4130
|
function a(A, O, L) {
|
|
4126
4131
|
return {
|
|
4127
|
-
r:
|
|
4128
|
-
g:
|
|
4129
|
-
b:
|
|
4132
|
+
r: B(A, 255) * 255,
|
|
4133
|
+
g: B(O, 255) * 255,
|
|
4134
|
+
b: B(L, 255) * 255
|
|
4130
4135
|
};
|
|
4131
4136
|
}
|
|
4132
4137
|
function o(A, O, L) {
|
|
4133
|
-
A =
|
|
4138
|
+
A = B(A, 255), O = B(O, 255), L = B(L, 255);
|
|
4134
4139
|
var P = Math.max(A, O, L), M = Math.min(A, O, L), T, V, K = (P + M) / 2;
|
|
4135
4140
|
if (P == M)
|
|
4136
4141
|
T = V = 0;
|
|
@@ -4157,7 +4162,7 @@ function oc() {
|
|
|
4157
4162
|
}
|
|
4158
4163
|
function h(A, O, L) {
|
|
4159
4164
|
var P, M, T;
|
|
4160
|
-
A =
|
|
4165
|
+
A = B(A, 360), O = B(O, 100), L = B(L, 100);
|
|
4161
4166
|
function V(me, Fe, ye) {
|
|
4162
4167
|
return ye < 0 && (ye += 1), ye > 1 && (ye -= 1), ye < 1 / 6 ? me + (Fe - me) * 6 * ye : ye < 1 / 2 ? Fe : ye < 2 / 3 ? me + (Fe - me) * (2 / 3 - ye) * 6 : me;
|
|
4163
4168
|
}
|
|
@@ -4174,7 +4179,7 @@ function oc() {
|
|
|
4174
4179
|
};
|
|
4175
4180
|
}
|
|
4176
4181
|
function i(A, O, L) {
|
|
4177
|
-
A =
|
|
4182
|
+
A = B(A, 255), O = B(O, 255), L = B(L, 255);
|
|
4178
4183
|
var P = Math.max(A, O, L), M = Math.min(A, O, L), T, V, K = P, Q = P - M;
|
|
4179
4184
|
if (V = P === 0 ? 0 : Q / P, P == M)
|
|
4180
4185
|
T = 0;
|
|
@@ -4199,7 +4204,7 @@ function oc() {
|
|
|
4199
4204
|
};
|
|
4200
4205
|
}
|
|
4201
4206
|
function t(A, O, L) {
|
|
4202
|
-
A =
|
|
4207
|
+
A = B(A, 360) * 6, O = B(O, 100), L = B(L, 100);
|
|
4203
4208
|
var P = Math.floor(A), M = A - P, T = L * (1 - O), V = L * (1 - M * O), K = L * (1 - (1 - M) * O), Q = P % 6, me = [L, V, T, T, K, L][Q], Fe = [K, L, L, V, T, T][Q], ye = [T, T, K, L, L, V][Q];
|
|
4204
4209
|
return {
|
|
4205
4210
|
r: me * 255,
|
|
@@ -4491,8 +4496,8 @@ function oc() {
|
|
|
4491
4496
|
whitesmoke: "f5f5f5",
|
|
4492
4497
|
yellow: "ff0",
|
|
4493
4498
|
yellowgreen: "9acd32"
|
|
4494
|
-
}, R = n.hexNames =
|
|
4495
|
-
function
|
|
4499
|
+
}, R = n.hexNames = q(I);
|
|
4500
|
+
function q(A) {
|
|
4496
4501
|
var O = {};
|
|
4497
4502
|
for (var L in A)
|
|
4498
4503
|
A.hasOwnProperty(L) && (O[A[L]] = L);
|
|
@@ -4501,7 +4506,7 @@ function oc() {
|
|
|
4501
4506
|
function D(A) {
|
|
4502
4507
|
return A = parseFloat(A), (isNaN(A) || A < 0 || A > 1) && (A = 1), A;
|
|
4503
4508
|
}
|
|
4504
|
-
function
|
|
4509
|
+
function B(A, O) {
|
|
4505
4510
|
Y(A) && (A = "100%");
|
|
4506
4511
|
var L = j(A);
|
|
4507
4512
|
return A = Math.min(O, Math.max(0, parseFloat(A))), L && (A = parseInt(A * O, 10) / 100), Math.abs(A - O) < 1e-6 ? 1 : A % O / parseFloat(O);
|
|
@@ -4958,7 +4963,7 @@ async function To() {
|
|
|
4958
4963
|
});
|
|
4959
4964
|
}
|
|
4960
4965
|
async function Ac() {
|
|
4961
|
-
const e = Object.entries(
|
|
4966
|
+
const e = Object.entries(F).filter(([, p]) => !Ha[p]).map(([, p]) => ({ value: p, label: p }));
|
|
4962
4967
|
return await Ul({
|
|
4963
4968
|
message: "Which template would you like to use?",
|
|
4964
4969
|
options: e
|
|
@@ -6101,7 +6106,7 @@ function Bc() {
|
|
|
6101
6106
|
return this.#g;
|
|
6102
6107
|
}
|
|
6103
6108
|
constructor(c) {
|
|
6104
|
-
const { max: u = 0, ttl: d, ttlResolution: v = 1, ttlAutopurge: r, updateAgeOnGet: b, updateAgeOnHas: w, allowStale: y, dispose: S, disposeAfter: C, noDisposeOnSet: E, noUpdateTTL: $, maxSize: _ = 0, maxEntrySize: N = 0, sizeCalculation: I, fetchMethod: R, memoMethod:
|
|
6109
|
+
const { max: u = 0, ttl: d, ttlResolution: v = 1, ttlAutopurge: r, updateAgeOnGet: b, updateAgeOnHas: w, allowStale: y, dispose: S, disposeAfter: C, noDisposeOnSet: E, noUpdateTTL: $, maxSize: _ = 0, maxEntrySize: N = 0, sizeCalculation: I, fetchMethod: R, memoMethod: q, noDeleteOnFetchRejection: D, noDeleteOnStaleGet: B, allowStaleOnFetchRejection: G, allowStaleOnFetchAbort: k, ignoreFetchAbort: Y } = c;
|
|
6105
6110
|
if (u !== 0 && !a(u))
|
|
6106
6111
|
throw new TypeError("max option must be a nonnegative integer");
|
|
6107
6112
|
const j = u ? o(u) : Array;
|
|
@@ -6113,9 +6118,9 @@ function Bc() {
|
|
|
6113
6118
|
if (typeof this.sizeCalculation != "function")
|
|
6114
6119
|
throw new TypeError("sizeCalculation set to non-function");
|
|
6115
6120
|
}
|
|
6116
|
-
if (
|
|
6121
|
+
if (q !== void 0 && typeof q != "function")
|
|
6117
6122
|
throw new TypeError("memoMethod must be a function if defined");
|
|
6118
|
-
if (this.#P =
|
|
6123
|
+
if (this.#P = q, R !== void 0 && typeof R != "function")
|
|
6119
6124
|
throw new TypeError("fetchMethod must be a function if specified");
|
|
6120
6125
|
if (this.#I = R, this.#O = !!R, this.#r = /* @__PURE__ */ new Map(), this.#n = new Array(u).fill(void 0), this.#e = new Array(u).fill(void 0), this.#f = new j(u), this.#p = new j(u), this.#u = 0, this.#a = 0, this.#b = i.create(u), this.#o = 0, this.#y = 0, typeof S == "function" && (this.#t = S), typeof C == "function" ? (this.#g = C, this.#l = []) : (this.#g = void 0, this.#l = void 0), this.#w = !!this.#t, this.#h = !!this.#g, this.noDisposeOnSet = !!E, this.noUpdateTTL = !!$, this.noDeleteOnFetchRejection = !!D, this.allowStaleOnFetchRejection = !!G, this.allowStaleOnFetchAbort = !!k, this.ignoreFetchAbort = !!Y, this.maxEntrySize !== 0) {
|
|
6121
6126
|
if (this.#c !== 0 && !a(this.#c))
|
|
@@ -6124,7 +6129,7 @@ function Bc() {
|
|
|
6124
6129
|
throw new TypeError("maxEntrySize must be a positive integer if specified");
|
|
6125
6130
|
this.#G();
|
|
6126
6131
|
}
|
|
6127
|
-
if (this.allowStale = !!y, this.noDeleteOnStaleGet = !!
|
|
6132
|
+
if (this.allowStale = !!y, this.noDeleteOnStaleGet = !!B, this.updateAgeOnGet = !!b, this.updateAgeOnHas = !!w, this.ttlResolution = a(v) || v === 0 ? v : 1, this.ttlAutopurge = !!r, this.ttl = d || 0, this.ttl) {
|
|
6128
6133
|
if (!a(this.ttl))
|
|
6129
6134
|
throw new TypeError("ttl must be a positive integer if specified");
|
|
6130
6135
|
this.#R();
|
|
@@ -6587,20 +6592,20 @@ function Bc() {
|
|
|
6587
6592
|
options: d,
|
|
6588
6593
|
context: v
|
|
6589
6594
|
}, S = (I, R = !1) => {
|
|
6590
|
-
const { aborted:
|
|
6591
|
-
if (d.status && (
|
|
6595
|
+
const { aborted: q } = b.signal, D = d.ignoreFetchAbort && I !== void 0;
|
|
6596
|
+
if (d.status && (q && !R ? (d.status.fetchAborted = !0, d.status.fetchError = b.signal.reason, D && (d.status.fetchAbortIgnored = !0)) : d.status.fetchResolved = !0), q && !D && !R)
|
|
6592
6597
|
return E(b.signal.reason);
|
|
6593
|
-
const
|
|
6594
|
-
return this.#e[u] === _ && (I === void 0 ?
|
|
6598
|
+
const B = _;
|
|
6599
|
+
return this.#e[u] === _ && (I === void 0 ? B.__staleWhileFetching ? this.#e[u] = B.__staleWhileFetching : this.#A(c, "fetch") : (d.status && (d.status.fetchUpdated = !0), this.set(c, I, y.options))), I;
|
|
6595
6600
|
}, C = (I) => (d.status && (d.status.fetchRejected = !0, d.status.fetchError = I), E(I)), E = (I) => {
|
|
6596
|
-
const { aborted: R } = b.signal,
|
|
6597
|
-
if (this.#e[u] === _ && (!
|
|
6601
|
+
const { aborted: R } = b.signal, q = R && d.allowStaleOnFetchAbort, D = q || d.allowStaleOnFetchRejection, B = D || d.noDeleteOnFetchRejection, G = _;
|
|
6602
|
+
if (this.#e[u] === _ && (!B || G.__staleWhileFetching === void 0 ? this.#A(c, "fetch") : q || (this.#e[u] = G.__staleWhileFetching)), D)
|
|
6598
6603
|
return d.status && G.__staleWhileFetching !== void 0 && (d.status.returnedStale = !0), G.__staleWhileFetching;
|
|
6599
6604
|
if (G.__returned === G)
|
|
6600
6605
|
throw I;
|
|
6601
6606
|
}, $ = (I, R) => {
|
|
6602
|
-
const
|
|
6603
|
-
|
|
6607
|
+
const q = this.#I?.(c, r, y);
|
|
6608
|
+
q && q instanceof Promise && q.then((D) => I(D === void 0 ? void 0 : D), R), b.signal.addEventListener("abort", () => {
|
|
6604
6609
|
(!d.ignoreFetchAbort || d.allowStaleOnFetchAbort) && (I(void 0), d.allowStaleOnFetchAbort && (I = (D) => S(D, !0)));
|
|
6605
6610
|
});
|
|
6606
6611
|
};
|
|
@@ -6637,17 +6642,17 @@ function Bc() {
|
|
|
6637
6642
|
allowStaleOnFetchAbort: N = this.allowStaleOnFetchAbort,
|
|
6638
6643
|
context: I,
|
|
6639
6644
|
forceRefresh: R = !1,
|
|
6640
|
-
status:
|
|
6645
|
+
status: q,
|
|
6641
6646
|
signal: D
|
|
6642
6647
|
} = u;
|
|
6643
6648
|
if (!this.#O)
|
|
6644
|
-
return
|
|
6649
|
+
return q && (q.fetch = "get"), this.get(c, {
|
|
6645
6650
|
allowStale: d,
|
|
6646
6651
|
updateAgeOnGet: v,
|
|
6647
6652
|
noDeleteOnStaleGet: r,
|
|
6648
|
-
status:
|
|
6653
|
+
status: q
|
|
6649
6654
|
});
|
|
6650
|
-
const
|
|
6655
|
+
const B = {
|
|
6651
6656
|
allowStale: d,
|
|
6652
6657
|
updateAgeOnGet: v,
|
|
6653
6658
|
noDeleteOnStaleGet: r,
|
|
@@ -6660,25 +6665,25 @@ function Bc() {
|
|
|
6660
6665
|
allowStaleOnFetchRejection: $,
|
|
6661
6666
|
allowStaleOnFetchAbort: N,
|
|
6662
6667
|
ignoreFetchAbort: _,
|
|
6663
|
-
status:
|
|
6668
|
+
status: q,
|
|
6664
6669
|
signal: D
|
|
6665
6670
|
};
|
|
6666
6671
|
let G = this.#r.get(c);
|
|
6667
6672
|
if (G === void 0) {
|
|
6668
|
-
|
|
6669
|
-
const k = this.#x(c, G,
|
|
6673
|
+
q && (q.fetch = "miss");
|
|
6674
|
+
const k = this.#x(c, G, B, I);
|
|
6670
6675
|
return k.__returned = k;
|
|
6671
6676
|
} else {
|
|
6672
6677
|
const k = this.#e[G];
|
|
6673
6678
|
if (this.#i(k)) {
|
|
6674
6679
|
const we = d && k.__staleWhileFetching !== void 0;
|
|
6675
|
-
return
|
|
6680
|
+
return q && (q.fetch = "inflight", we && (q.returnedStale = !0)), we ? k.__staleWhileFetching : k.__returned = k;
|
|
6676
6681
|
}
|
|
6677
6682
|
const Y = this.#m(G);
|
|
6678
6683
|
if (!R && !Y)
|
|
6679
|
-
return
|
|
6680
|
-
const j = this.#x(c, G,
|
|
6681
|
-
return
|
|
6684
|
+
return q && (q.fetch = "hit"), this.#N(G), v && this.#$(G), q && this.#L(q, G), k;
|
|
6685
|
+
const j = this.#x(c, G, B, I), ne = j.__staleWhileFetching !== void 0 && d;
|
|
6686
|
+
return q && (q.fetch = Y ? "stale" : "refresh", ne && Y && (q.returnedStale = !0)), ne ? j.__staleWhileFetching : j.__returned = j;
|
|
6682
6687
|
}
|
|
6683
6688
|
}
|
|
6684
6689
|
async forceFetch(c, u = {}) {
|
|
@@ -8361,18 +8366,18 @@ ${u}`) + "'";
|
|
|
8361
8366
|
`);
|
|
8362
8367
|
N === -1 ? E = "-" : u === _ || N !== _.length - 1 ? (E = "+", r && r()) : E = "", _ && (u = u.slice(0, -_.length), _[_.length - 1] === `
|
|
8363
8368
|
` && (_ = _.slice(0, -1)), _ = _.replace(o, `$&${S}`));
|
|
8364
|
-
let I = !1, R,
|
|
8369
|
+
let I = !1, R, q = -1;
|
|
8365
8370
|
for (R = 0; R < u.length; ++R) {
|
|
8366
8371
|
const k = u[R];
|
|
8367
8372
|
if (k === " ")
|
|
8368
8373
|
I = !0;
|
|
8369
8374
|
else if (k === `
|
|
8370
8375
|
`)
|
|
8371
|
-
|
|
8376
|
+
q = R;
|
|
8372
8377
|
else
|
|
8373
8378
|
break;
|
|
8374
8379
|
}
|
|
8375
|
-
let D = u.substring(0,
|
|
8380
|
+
let D = u.substring(0, q < R ? q + 1 : R);
|
|
8376
8381
|
D && (u = u.substring(D.length), D = D.replace(/\n+/g, `$&${S}`));
|
|
8377
8382
|
let G = (I ? S ? "2" : "1" : "") + E;
|
|
8378
8383
|
if (l && (G += " " + w(l.replace(/ ?[\r\n]+/g, " ")), v && v()), !C) {
|
|
@@ -8597,13 +8602,13 @@ ${g.indentComment(R, a.indent)}`;
|
|
|
8597
8602
|
`) : I += `
|
|
8598
8603
|
${a.indent}`;
|
|
8599
8604
|
} else if (!b && e.isCollection(s)) {
|
|
8600
|
-
const R = N[0],
|
|
8601
|
-
`), D =
|
|
8602
|
-
if (D || !
|
|
8605
|
+
const R = N[0], q = N.indexOf(`
|
|
8606
|
+
`), D = q !== -1, B = a.inFlow ?? s.flow ?? s.items.length === 0;
|
|
8607
|
+
if (D || !B) {
|
|
8603
8608
|
let G = !1;
|
|
8604
8609
|
if (D && (R === "&" || R === "!")) {
|
|
8605
8610
|
let k = N.indexOf(" ");
|
|
8606
|
-
R === "&" && k !== -1 && k <
|
|
8611
|
+
R === "&" && k !== -1 && k < q && N[k + 1] === "!" && (k = N.indexOf(" ", k + 1)), (k === -1 || q < k) && (G = !0);
|
|
8607
8612
|
}
|
|
8608
8613
|
G || (I = `
|
|
8609
8614
|
${a.indent}`);
|
|
@@ -9806,8 +9811,8 @@ function Mu() {
|
|
|
9806
9811
|
return C && ($ = $.concat(i.merge)), $.reduce((_, N) => {
|
|
9807
9812
|
const I = typeof N == "string" ? r[N] : N;
|
|
9808
9813
|
if (!I) {
|
|
9809
|
-
const R = JSON.stringify(N),
|
|
9810
|
-
throw new Error(`Unknown custom tag ${R}; use one of ${
|
|
9814
|
+
const R = JSON.stringify(N), q = Object.keys(r).map((D) => JSON.stringify(D)).join(", ");
|
|
9815
|
+
throw new Error(`Unknown custom tag ${R}; use one of ${q}`);
|
|
9811
9816
|
}
|
|
9812
9817
|
return _.includes(I) || _.push(I), _;
|
|
9813
9818
|
}, []);
|
|
@@ -9946,7 +9951,7 @@ function Yt() {
|
|
|
9946
9951
|
if (typeof d == "function")
|
|
9947
9952
|
u = d.call({ "": u }, "", u), r = d;
|
|
9948
9953
|
else if (Array.isArray(d)) {
|
|
9949
|
-
const
|
|
9954
|
+
const q = (B) => typeof B == "number" || B instanceof String || B instanceof Number, D = d.filter(q).map(String);
|
|
9950
9955
|
D.length > 0 && (d = d.concat(D)), r = d;
|
|
9951
9956
|
} else v === void 0 && d && (v = d, d = void 0);
|
|
9952
9957
|
const { aliasDuplicateObjects: b, anchorPrefix: w, flow: y, keepUndefined: S, onTagObj: C, tag: E } = v ?? {}, { onAnchor: $, setAnchors: _, sourceObjects: N } = a.createNodeAnchors(
|
|
@@ -10317,8 +10322,8 @@ function Fu() {
|
|
|
10317
10322
|
$ && (C?.type === "block-map" && !I.hasNewline && l(v, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"), i.options.strict && E.start < I.found.offset - 1024 && l(N.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));
|
|
10318
10323
|
const R = C ? o(i, C, I, l) : h(i, v, S, null, I, l);
|
|
10319
10324
|
i.schema.compat && f.flowIndentCheck(t.indent, C, l), v = R.range[2];
|
|
10320
|
-
const
|
|
10321
|
-
i.options.keepSourceTokens && (
|
|
10325
|
+
const q = new e.Pair(N, R);
|
|
10326
|
+
i.options.keepSourceTokens && (q.srcToken = b), d.items.push(q);
|
|
10322
10327
|
} else {
|
|
10323
10328
|
$ && l(N.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"), I.comment && (N.comment ? N.comment += `
|
|
10324
10329
|
` + I.comment : N.comment = I.comment);
|
|
@@ -10408,17 +10413,17 @@ function qu() {
|
|
|
10408
10413
|
S && (c.atRoot = !1), c.atKey && (c.atKey = !1);
|
|
10409
10414
|
let C = u.offset + u.start.source.length;
|
|
10410
10415
|
for (let I = 0; I < u.items.length; ++I) {
|
|
10411
|
-
const R = u.items[I], { start:
|
|
10416
|
+
const R = u.items[I], { start: q, key: D, sep: B, value: G } = R, k = n.resolveProps(q, {
|
|
10412
10417
|
flow: b,
|
|
10413
10418
|
indicator: "explicit-key-ind",
|
|
10414
|
-
next: D ??
|
|
10419
|
+
next: D ?? B?.[0],
|
|
10415
10420
|
offset: C,
|
|
10416
10421
|
onError: d,
|
|
10417
10422
|
parentIndent: u.indent,
|
|
10418
10423
|
startOnNewline: !1
|
|
10419
10424
|
});
|
|
10420
10425
|
if (!k.found) {
|
|
10421
|
-
if (!k.anchor && !k.tag && !
|
|
10426
|
+
if (!k.anchor && !k.tag && !B && !G) {
|
|
10422
10427
|
I === 0 && k.comma ? d(k.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${b}`) : I < u.items.length - 1 && d(k.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${b}`), k.comment && (y.comment ? y.comment += `
|
|
10423
10428
|
` + k.comment : y.comment = k.comment), C = k.end;
|
|
10424
10429
|
continue;
|
|
@@ -10434,7 +10439,7 @@ function qu() {
|
|
|
10434
10439
|
k.comma && d(k.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${b}`);
|
|
10435
10440
|
else if (k.comma || d(k.start, "MISSING_CHAR", `Missing , between ${b} items`), k.comment) {
|
|
10436
10441
|
let Y = "";
|
|
10437
|
-
e: for (const j of
|
|
10442
|
+
e: for (const j of q)
|
|
10438
10443
|
switch (j.type) {
|
|
10439
10444
|
case "comma":
|
|
10440
10445
|
case "space":
|
|
@@ -10451,14 +10456,14 @@ function qu() {
|
|
|
10451
10456
|
` + Y : j.comment = Y, k.comment = k.comment.substring(Y.length + 1);
|
|
10452
10457
|
}
|
|
10453
10458
|
}
|
|
10454
|
-
if (!r && !
|
|
10455
|
-
const Y = G ? t(c, G, k, d) : l(c, k.end,
|
|
10459
|
+
if (!r && !B && !k.found) {
|
|
10460
|
+
const Y = G ? t(c, G, k, d) : l(c, k.end, B, null, k, d);
|
|
10456
10461
|
y.items.push(Y), C = Y.range[2], h(G) && d(Y.range, "BLOCK_IN_FLOW", o);
|
|
10457
10462
|
} else {
|
|
10458
10463
|
c.atKey = !0;
|
|
10459
|
-
const Y = k.end, j = D ? t(c, D, k, d) : l(c, Y,
|
|
10464
|
+
const Y = k.end, j = D ? t(c, D, k, d) : l(c, Y, q, null, k, d);
|
|
10460
10465
|
h(D) && d(j.range, "BLOCK_IN_FLOW", o), c.atKey = !1;
|
|
10461
|
-
const U = n.resolveProps(
|
|
10466
|
+
const U = n.resolveProps(B ?? [], {
|
|
10462
10467
|
flow: b,
|
|
10463
10468
|
indicator: "map-value-ind",
|
|
10464
10469
|
next: G,
|
|
@@ -10469,8 +10474,8 @@ function qu() {
|
|
|
10469
10474
|
});
|
|
10470
10475
|
if (U.found) {
|
|
10471
10476
|
if (!r && !k.found && c.options.strict) {
|
|
10472
|
-
if (
|
|
10473
|
-
for (const ce of
|
|
10477
|
+
if (B)
|
|
10478
|
+
for (const ce of B) {
|
|
10474
10479
|
if (ce === U.found)
|
|
10475
10480
|
break;
|
|
10476
10481
|
if (ce.type === "newline") {
|
|
@@ -10481,7 +10486,7 @@ function qu() {
|
|
|
10481
10486
|
k.start < U.found.offset - 1024 && d(U.found, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit flow sequence key");
|
|
10482
10487
|
}
|
|
10483
10488
|
} else G && ("source" in G && G.source?.[0] === ":" ? d(G, "MISSING_CHAR", `Missing space after : in ${b}`) : d(U.start, "MISSING_CHAR", `Missing , or : between ${b} items`));
|
|
10484
|
-
const ne = G ? t(c, G, U, d) : U.found ? l(c, U.end,
|
|
10489
|
+
const ne = G ? t(c, G, U, d) : U.found ? l(c, U.end, B, null, U, d) : null;
|
|
10485
10490
|
ne ? h(G) && d(ne.range, "BLOCK_IN_FLOW", o) : U.comment && (j.comment ? j.comment += `
|
|
10486
10491
|
` + U.comment : j.comment = U.comment);
|
|
10487
10492
|
const we = new p.Pair(j, ne);
|
|
@@ -11153,7 +11158,7 @@ ${l.comment}` : l.comment;
|
|
|
11153
11158
|
}
|
|
11154
11159
|
return _i.Composer = h, _i;
|
|
11155
11160
|
}
|
|
11156
|
-
var
|
|
11161
|
+
var oe = {}, Ke = {}, to;
|
|
11157
11162
|
function Wu() {
|
|
11158
11163
|
if (to) return Ke;
|
|
11159
11164
|
to = 1;
|
|
@@ -11419,7 +11424,7 @@ function Ku() {
|
|
|
11419
11424
|
}
|
|
11420
11425
|
var so;
|
|
11421
11426
|
function Yn() {
|
|
11422
|
-
if (so) return
|
|
11427
|
+
if (so) return oe;
|
|
11423
11428
|
so = 1;
|
|
11424
11429
|
var e = Wu(), p = Yu(), m = Ku();
|
|
11425
11430
|
const g = "\uFEFF", f = "", n = "", s = "", a = (t) => !!t && "items" in t, o = (t) => !!t && (t.type === "scalar" || t.type === "single-quoted-scalar" || t.type === "double-quoted-scalar" || t.type === "block-scalar");
|
|
@@ -11498,7 +11503,7 @@ function Yn() {
|
|
|
11498
11503
|
}
|
|
11499
11504
|
return null;
|
|
11500
11505
|
}
|
|
11501
|
-
return
|
|
11506
|
+
return oe.createScalarToken = e.createScalarToken, oe.resolveAsScalar = e.resolveAsScalar, oe.setScalarValue = e.setScalarValue, oe.stringify = p.stringify, oe.visit = m.visit, oe.BOM = g, oe.DOCUMENT = f, oe.FLOW_END = n, oe.SCALAR = s, oe.isCollection = a, oe.isScalar = o, oe.prettyToken = h, oe.tokenType = i, oe;
|
|
11502
11507
|
}
|
|
11503
11508
|
var gn = {}, ro;
|
|
11504
11509
|
function la() {
|
|
@@ -12791,7 +12796,7 @@ const rf = (e) => {
|
|
|
12791
12796
|
}
|
|
12792
12797
|
case "template": {
|
|
12793
12798
|
const f = e.template, n = f?.toLowerCase();
|
|
12794
|
-
if (!n || !Object.values(
|
|
12799
|
+
if (!n || !Object.values(F).includes(n))
|
|
12795
12800
|
throw new Error(`Invalid template: ${f}`);
|
|
12796
12801
|
p.template = n;
|
|
12797
12802
|
break;
|
|
@@ -12841,7 +12846,7 @@ function lf(e, p) {
|
|
|
12841
12846
|
}
|
|
12842
12847
|
function cf(e, p) {
|
|
12843
12848
|
const m = Ga[e];
|
|
12844
|
-
if (p ===
|
|
12849
|
+
if (p === F.luminaComponents)
|
|
12845
12850
|
throw new Error(`Template "${p}" is not available for domain "${e}"`);
|
|
12846
12851
|
const g = m[p];
|
|
12847
12852
|
if (!g)
|
|
@@ -12952,7 +12957,7 @@ Happy mapping!`));
|
|
|
12952
12957
|
}
|
|
12953
12958
|
async function ff(e) {
|
|
12954
12959
|
const { template: p, branch: m = Nn } = e;
|
|
12955
|
-
p !==
|
|
12960
|
+
p !== F.luminaComponents && (Le(Z.red("Template option is required for code sample initialization")), process.exit(1)), e.host || (Le(Z.red("Host option is required for the lumina-components template")), process.exit(1));
|
|
12956
12961
|
const g = da(e);
|
|
12957
12962
|
try {
|
|
12958
12963
|
ko();
|
|
@@ -13020,7 +13025,7 @@ const ga = (e) => {
|
|
|
13020
13025
|
writeErr: () => ""
|
|
13021
13026
|
}), p.version(qa.version), p.option("-n, --name <name>", "Name of the project").option("-d, --domain <domain>", "Domain of the sample to create").option("-t, --template <template>", "Template to use").option("--host <host>", "Host to use for the source control repository").option("--branch <branch>", "Branch to checkout in the source control repository"), p.command("init").description("Initialize a new ArcGIS project").action(async () => {
|
|
13022
13027
|
const m = rf(p.opts());
|
|
13023
|
-
if (m.template && Ua[m.template] ===
|
|
13028
|
+
if (m.template && Ua[m.template] === se.codeSample) {
|
|
13024
13029
|
await ff(m);
|
|
13025
13030
|
return;
|
|
13026
13031
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/create",
|
|
3
|
-
"version": "5.1.0-next.
|
|
4
|
-
"description": "ArcGIS
|
|
3
|
+
"version": "5.1.0-next.22",
|
|
4
|
+
"description": "The ArcGIS Maps SDK for JavaScript provides this CLI tool to streamline the process of creating a new web mapping application.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ArcGIS",
|
|
7
7
|
"javascript",
|