@arcgis/create 5.0.0 → 5.0.1
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 +186 -179
- 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
|
|
1681
|
-
(
|
|
1680
|
+
const q = y.find(
|
|
1681
|
+
(F) => g.existsSync(`${R}${F}`)
|
|
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.0.
|
|
2615
|
+
} = Da, Ba = "5.0.1", qa = {
|
|
2616
2616
|
version: Ba
|
|
2617
|
-
},
|
|
2617
|
+
}, D = {
|
|
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,77 @@ 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
|
+
[D.angular]: "templates/js-maps-sdk-angular",
|
|
2639
|
+
[D.cdn]: "templates/js-maps-sdk-cdn",
|
|
2640
|
+
[D.node]: "templates/js-maps-sdk-node",
|
|
2641
|
+
[D.react]: "templates/js-maps-sdk-react",
|
|
2642
|
+
[D.vite]: "templates/js-maps-sdk-vite",
|
|
2643
|
+
[D.vue]: "templates/js-maps-sdk-vue",
|
|
2644
|
+
[D.webpack]: "templates/js-maps-sdk-webpack",
|
|
2645
|
+
[D.disconnectedEnvironment]: "templates/disconnected-environment",
|
|
2646
|
+
[D.geometryOperatorWorker]: "templates/geometry-operator-worker",
|
|
2647
|
+
[D.aiComponentsCustomAgentToolsReact]: "templates/ai-components-custom-agent-tools-react",
|
|
2648
|
+
[D.aiComponentsCustomAgentHilReact]: "templates/ai-components-custom-agent-hil-react",
|
|
2649
|
+
[D.codingComponentsAngular]: "templates/coding-components-angular",
|
|
2650
|
+
[D.codingComponentsReact]: "templates/coding-components-react",
|
|
2651
|
+
[D.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
|
+
[D.angular]: "Esri/jsapi-resources",
|
|
2658
|
+
[D.cdn]: "Esri/jsapi-resources",
|
|
2659
|
+
[D.node]: "Esri/jsapi-resources",
|
|
2660
|
+
[D.react]: "Esri/jsapi-resources",
|
|
2661
|
+
[D.vite]: "Esri/jsapi-resources",
|
|
2662
|
+
[D.vue]: "Esri/jsapi-resources",
|
|
2663
|
+
[D.webpack]: "Esri/jsapi-resources",
|
|
2664
|
+
[D.codingComponentsAngular]: "Esri/jsapi-resources",
|
|
2665
|
+
[D.codingComponentsReact]: "Esri/jsapi-resources",
|
|
2666
|
+
[D.codingComponentsVite]: "Esri/jsapi-resources",
|
|
2667
|
+
[D.disconnectedEnvironment]: "Esri/jsapi-resources",
|
|
2668
|
+
[D.geometryOperatorWorker]: "Esri/jsapi-resources",
|
|
2669
|
+
[D.aiComponentsCustomAgentToolsReact]: "Esri/jsapi-resources",
|
|
2670
|
+
[D.aiComponentsCustomAgentHilReact]: "Esri/jsapi-resources",
|
|
2668
2671
|
// code sample templates
|
|
2669
|
-
[
|
|
2672
|
+
[D.luminaComponents]: "WebGIS/arcgis-web-components"
|
|
2670
2673
|
}, ja = {
|
|
2671
|
-
[
|
|
2672
|
-
[
|
|
2673
|
-
[
|
|
2674
|
-
[
|
|
2675
|
-
[
|
|
2676
|
-
[
|
|
2677
|
-
[
|
|
2678
|
-
[
|
|
2679
|
-
[
|
|
2680
|
-
[
|
|
2681
|
-
[
|
|
2682
|
-
[
|
|
2683
|
-
[
|
|
2684
|
-
[
|
|
2674
|
+
[D.angular]: "templates/js-maps-sdk-angular",
|
|
2675
|
+
[D.cdn]: "templates/js-maps-sdk-cdn",
|
|
2676
|
+
[D.node]: "templates/js-maps-sdk-node",
|
|
2677
|
+
[D.react]: "templates/js-maps-sdk-react",
|
|
2678
|
+
[D.vite]: "templates/js-maps-sdk-vite",
|
|
2679
|
+
[D.vue]: "templates/js-maps-sdk-vue",
|
|
2680
|
+
[D.webpack]: "templates/js-maps-sdk-webpack",
|
|
2681
|
+
[D.codingComponentsAngular]: "templates/coding-components-angular",
|
|
2682
|
+
[D.codingComponentsReact]: "templates/coding-components-react",
|
|
2683
|
+
[D.codingComponentsVite]: "templates/coding-components-vite",
|
|
2684
|
+
[D.disconnectedEnvironment]: "templates/disconnected-environment",
|
|
2685
|
+
[D.geometryOperatorWorker]: "templates/geometry-operator-worker",
|
|
2686
|
+
[D.aiComponentsCustomAgentToolsReact]: "templates/ai-components-custom-agent-tools-react",
|
|
2687
|
+
[D.aiComponentsCustomAgentHilReact]: "templates/ai-components-custom-agent-hil-react",
|
|
2688
|
+
[D.luminaComponents]: "packages/starter-packages/lumina-components"
|
|
2685
2689
|
}, Ua = {
|
|
2686
|
-
[
|
|
2687
|
-
[
|
|
2688
|
-
[
|
|
2689
|
-
[
|
|
2690
|
-
[
|
|
2691
|
-
[
|
|
2692
|
-
[
|
|
2693
|
-
[
|
|
2694
|
-
[
|
|
2695
|
-
[
|
|
2696
|
-
[
|
|
2697
|
-
[
|
|
2698
|
-
[
|
|
2699
|
-
[
|
|
2690
|
+
[D.angular]: se.appSample,
|
|
2691
|
+
[D.cdn]: se.appSample,
|
|
2692
|
+
[D.node]: se.appSample,
|
|
2693
|
+
[D.react]: se.appSample,
|
|
2694
|
+
[D.vite]: se.appSample,
|
|
2695
|
+
[D.vue]: se.appSample,
|
|
2696
|
+
[D.webpack]: se.appSample,
|
|
2697
|
+
[D.codingComponentsAngular]: se.appSample,
|
|
2698
|
+
[D.codingComponentsReact]: se.appSample,
|
|
2699
|
+
[D.codingComponentsVite]: se.appSample,
|
|
2700
|
+
[D.disconnectedEnvironment]: se.appSample,
|
|
2701
|
+
[D.geometryOperatorWorker]: se.appSample,
|
|
2702
|
+
[D.aiComponentsCustomAgentToolsReact]: se.appSample,
|
|
2703
|
+
[D.aiComponentsCustomAgentHilReact]: se.appSample,
|
|
2704
|
+
[D.luminaComponents]: se.codeSample
|
|
2700
2705
|
}, Ha = {
|
|
2701
|
-
[
|
|
2706
|
+
[D.luminaComponents]: !0,
|
|
2707
|
+
[D.aiComponentsCustomAgentToolsReact]: !0,
|
|
2708
|
+
[D.aiComponentsCustomAgentHilReact]: !0
|
|
2702
2709
|
};
|
|
2703
2710
|
var ft = { exports: {} }, ss;
|
|
2704
2711
|
function Va() {
|
|
@@ -2806,7 +2813,7 @@ function Ya() {
|
|
|
2806
2813
|
};
|
|
2807
2814
|
return Xt = { cursor: g, scroll: f, erase: n, beep: m }, Xt;
|
|
2808
2815
|
}
|
|
2809
|
-
var
|
|
2816
|
+
var re = Ya();
|
|
2810
2817
|
function kt(e, p, m) {
|
|
2811
2818
|
if (!m.some((s) => !s.disabled)) return e;
|
|
2812
2819
|
const g = e + p, f = Math.max(m.length - 1, 0), n = g < 0 ? f : g > f ? 0 : g;
|
|
@@ -2978,7 +2985,7 @@ function cl({ input: e = fo, output: p = On, overwrite: m = !0, hideCursor: g =
|
|
|
2978
2985
|
const n = (s, { name: a, sequence: o }) => {
|
|
2979
2986
|
const h = String(s);
|
|
2980
2987
|
if (kn([h, a, o], "cancel")) {
|
|
2981
|
-
g && p.write(
|
|
2988
|
+
g && p.write(re.cursor.show), process.exit(0);
|
|
2982
2989
|
return;
|
|
2983
2990
|
}
|
|
2984
2991
|
if (!m) return;
|
|
@@ -2989,8 +2996,8 @@ function cl({ input: e = fo, output: p = On, overwrite: m = !0, hideCursor: g =
|
|
|
2989
2996
|
});
|
|
2990
2997
|
});
|
|
2991
2998
|
};
|
|
2992
|
-
return g && p.write(
|
|
2993
|
-
e.off("keypress", n), g && p.write(
|
|
2999
|
+
return g && p.write(re.cursor.hide), e.once("keypress", n), () => {
|
|
3000
|
+
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
3001
|
};
|
|
2995
3002
|
}
|
|
2996
3003
|
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 +3053,9 @@ let xn = class {
|
|
|
3046
3053
|
}, { once: !0 });
|
|
3047
3054
|
}
|
|
3048
3055
|
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(
|
|
3056
|
+
this.output.write(re.cursor.show), this.output.off("resize", this.render), mt(this.input, !1), p(this.value);
|
|
3050
3057
|
}), this.once("cancel", () => {
|
|
3051
|
-
this.output.write(
|
|
3058
|
+
this.output.write(re.cursor.show), this.output.off("resize", this.render), mt(this.input, !1), p(Sn);
|
|
3052
3059
|
});
|
|
3053
3060
|
});
|
|
3054
3061
|
}
|
|
@@ -3081,12 +3088,12 @@ let xn = class {
|
|
|
3081
3088
|
restoreCursor() {
|
|
3082
3089
|
const p = vn(this._prevFrame, process.stdout.columns, { hard: !0, trim: !1 }).split(`
|
|
3083
3090
|
`).length - 1;
|
|
3084
|
-
this.output.write(
|
|
3091
|
+
this.output.write(re.cursor.move(-999, p * -1));
|
|
3085
3092
|
}
|
|
3086
3093
|
render() {
|
|
3087
3094
|
const p = vn(this._render(this) ?? "", process.stdout.columns, { hard: !0, trim: !1 });
|
|
3088
3095
|
if (p !== this._prevFrame) {
|
|
3089
|
-
if (this.state === "initial") this.output.write(
|
|
3096
|
+
if (this.state === "initial") this.output.write(re.cursor.hide);
|
|
3090
3097
|
else {
|
|
3091
3098
|
const m = al(this._prevFrame, p), g = Co(this.output);
|
|
3092
3099
|
if (this.restoreCursor(), m) {
|
|
@@ -3097,18 +3104,18 @@ let xn = class {
|
|
|
3097
3104
|
return;
|
|
3098
3105
|
}
|
|
3099
3106
|
if (m.lines.length === 1) {
|
|
3100
|
-
this.output.write(
|
|
3107
|
+
this.output.write(re.cursor.move(0, s - n)), this.output.write(re.erase.lines(1));
|
|
3101
3108
|
const a = p.split(`
|
|
3102
3109
|
`);
|
|
3103
|
-
this.output.write(a[s]), this._prevFrame = p, this.output.write(
|
|
3110
|
+
this.output.write(a[s]), this._prevFrame = p, this.output.write(re.cursor.move(0, a.length - s - 1));
|
|
3104
3111
|
return;
|
|
3105
3112
|
} else if (m.lines.length > 1) {
|
|
3106
3113
|
if (f < n) s = f;
|
|
3107
3114
|
else {
|
|
3108
3115
|
const o = s - n;
|
|
3109
|
-
o > 0 && this.output.write(
|
|
3116
|
+
o > 0 && this.output.write(re.cursor.move(0, o));
|
|
3110
3117
|
}
|
|
3111
|
-
this.output.write(
|
|
3118
|
+
this.output.write(re.erase.down());
|
|
3112
3119
|
const a = p.split(`
|
|
3113
3120
|
`).slice(s);
|
|
3114
3121
|
this.output.write(a.join(`
|
|
@@ -3116,7 +3123,7 @@ let xn = class {
|
|
|
3116
3123
|
return;
|
|
3117
3124
|
}
|
|
3118
3125
|
}
|
|
3119
|
-
this.output.write(
|
|
3126
|
+
this.output.write(re.erase.down());
|
|
3120
3127
|
}
|
|
3121
3128
|
this.output.write(p), this.state === "initial" && (this.state = "active"), this._prevFrame = p;
|
|
3122
3129
|
}
|
|
@@ -3379,7 +3386,7 @@ const Ml = (e, p, m, g, f) => {
|
|
|
3379
3386
|
}
|
|
3380
3387
|
if (w > l) {
|
|
3381
3388
|
let E = 0, $ = 0, _ = w;
|
|
3382
|
-
const N = p - y, I = (R,
|
|
3389
|
+
const N = p - y, I = (R, q) => Ml(b, _, R, q, l);
|
|
3383
3390
|
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
3391
|
}
|
|
3385
3392
|
const C = [];
|
|
@@ -3467,9 +3474,9 @@ ${s}
|
|
|
3467
3474
|
} }).prompt(), Gl = x.magenta, jl = ({ indicator: e = "dots", onCancel: p, output: m = process.stdout, cancelMessage: g, errorMessage: f, frames: n = wn ? ["◒", "◐", "◓", "◑"] : ["•", "o", "O", "0"], delay: s = wn ? 80 : 120, signal: a, ...o } = {}) => {
|
|
3468
3475
|
const h = dl();
|
|
3469
3476
|
let i, t, l = !1, c = !1, u = "", d, v = performance.now();
|
|
3470
|
-
const r = Tn(m), b = o?.styleFrame ?? Gl, w = (
|
|
3471
|
-
const
|
|
3472
|
-
c =
|
|
3477
|
+
const r = Tn(m), b = o?.styleFrame ?? Gl, w = (F) => {
|
|
3478
|
+
const B = F > 1 ? f ?? ve.messages.error : g ?? ve.messages.cancel;
|
|
3479
|
+
c = F === 1, l && (q(B, F), c && typeof p == "function" && p());
|
|
3473
3480
|
}, y = () => w(2), S = () => w(1), C = () => {
|
|
3474
3481
|
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
3482
|
}, E = () => {
|
|
@@ -3478,20 +3485,20 @@ ${s}
|
|
|
3478
3485
|
if (d === void 0) return;
|
|
3479
3486
|
h && m.write(`
|
|
3480
3487
|
`);
|
|
3481
|
-
const
|
|
3488
|
+
const F = Cn(d, r, { hard: !0, trim: !1 }).split(`
|
|
3482
3489
|
`);
|
|
3483
|
-
|
|
3484
|
-
}, _ = (
|
|
3485
|
-
const
|
|
3490
|
+
F.length > 1 && m.write(re.cursor.up(F.length - 1)), m.write(re.cursor.to(0)), m.write(re.erase.down());
|
|
3491
|
+
}, _ = (F) => F.replace(/\.+$/, ""), N = (F) => {
|
|
3492
|
+
const B = (performance.now() - F) / 1e3, G = Math.floor(B / 60), k = Math.floor(B % 60);
|
|
3486
3493
|
return G > 0 ? `[${G}m ${k}s]` : `[${k}s]`;
|
|
3487
|
-
}, I = o.withGuide ?? ve.withGuide, R = (
|
|
3488
|
-
l = !0, i = cl({ output: m }), u = _(
|
|
3494
|
+
}, I = o.withGuide ?? ve.withGuide, R = (F = "") => {
|
|
3495
|
+
l = !0, i = cl({ output: m }), u = _(F), v = performance.now(), I && m.write(`${x.gray(J)}
|
|
3489
3496
|
`);
|
|
3490
|
-
let
|
|
3497
|
+
let B = 0, G = 0;
|
|
3491
3498
|
C(), t = setInterval(() => {
|
|
3492
3499
|
if (h && u === d) return;
|
|
3493
3500
|
$(), d = u;
|
|
3494
|
-
const k = b(n[
|
|
3501
|
+
const k = b(n[B]);
|
|
3495
3502
|
let Y;
|
|
3496
3503
|
if (h) Y = `${k} ${u}...`;
|
|
3497
3504
|
else if (e === "timer") Y = `${k} ${u} ${N(v)}`;
|
|
@@ -3500,19 +3507,19 @@ ${s}
|
|
|
3500
3507
|
Y = `${k} ${u}${U}`;
|
|
3501
3508
|
}
|
|
3502
3509
|
const j = Cn(Y, r, { hard: !0, trim: !1 });
|
|
3503
|
-
m.write(j),
|
|
3510
|
+
m.write(j), B = B + 1 < n.length ? B + 1 : 0, G = G < 4 ? G + 0.125 : 0;
|
|
3504
3511
|
}, s);
|
|
3505
|
-
},
|
|
3512
|
+
}, q = (F = "", B = 0, G = !1) => {
|
|
3506
3513
|
if (!l) return;
|
|
3507
3514
|
l = !1, clearInterval(t), $();
|
|
3508
|
-
const k =
|
|
3509
|
-
u =
|
|
3515
|
+
const k = B === 0 ? x.green(Rn) : B === 1 ? x.red(Eo) : x.red(Ao);
|
|
3516
|
+
u = F ?? u, G || (e === "timer" ? m.write(`${k} ${u} ${N(v)}
|
|
3510
3517
|
`) : m.write(`${k} ${u}
|
|
3511
3518
|
`)), E(), i();
|
|
3512
3519
|
};
|
|
3513
|
-
return { start: R, stop: (
|
|
3514
|
-
u = _(
|
|
3515
|
-
}, cancel: (
|
|
3520
|
+
return { start: R, stop: (F = "") => q(F, 0), message: (F = "") => {
|
|
3521
|
+
u = _(F ?? u);
|
|
3522
|
+
}, cancel: (F = "") => q(F, 1), error: (F = "") => q(F, 2), clear: () => q("", 0, !0), get isCancelled() {
|
|
3516
3523
|
return c;
|
|
3517
3524
|
} };
|
|
3518
3525
|
}, vt = (e, p) => e.includes(`
|
|
@@ -3966,7 +3973,7 @@ function oc() {
|
|
|
3966
3973
|
return L = O.r / 255, P = O.g / 255, M = O.b / 255, L <= 0.03928 ? T = L / 12.92 : T = Math.pow((L + 0.055) / 1.055, 2.4), P <= 0.03928 ? V = P / 12.92 : V = Math.pow((P + 0.055) / 1.055, 2.4), M <= 0.03928 ? K = M / 12.92 : K = Math.pow((M + 0.055) / 1.055, 2.4), 0.2126 * T + 0.7152 * V + 0.0722 * K;
|
|
3967
3974
|
},
|
|
3968
3975
|
setAlpha: function(O) {
|
|
3969
|
-
return this._a =
|
|
3976
|
+
return this._a = F(O), this._roundA = Math.round(100 * this._a) / 100, this;
|
|
3970
3977
|
},
|
|
3971
3978
|
toHsv: function() {
|
|
3972
3979
|
var O = i(this._r, this._g, this._b);
|
|
@@ -4019,14 +4026,14 @@ function oc() {
|
|
|
4019
4026
|
},
|
|
4020
4027
|
toPercentageRgb: function() {
|
|
4021
4028
|
return {
|
|
4022
|
-
r: Math.round(
|
|
4023
|
-
g: Math.round(
|
|
4024
|
-
b: Math.round(
|
|
4029
|
+
r: Math.round(B(this._r, 255) * 100) + "%",
|
|
4030
|
+
g: Math.round(B(this._g, 255) * 100) + "%",
|
|
4031
|
+
b: Math.round(B(this._b, 255) * 100) + "%",
|
|
4025
4032
|
a: this._a
|
|
4026
4033
|
};
|
|
4027
4034
|
},
|
|
4028
4035
|
toPercentageRgbString: function() {
|
|
4029
|
-
return this._a == 1 ? "rgb(" + Math.round(
|
|
4036
|
+
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
4037
|
},
|
|
4031
4038
|
toName: function() {
|
|
4032
4039
|
return this._a === 0 ? "transparent" : this._a < 1 ? !1 : R[l(this._r, this._g, this._b, !0)] || !1;
|
|
@@ -4113,7 +4120,7 @@ function oc() {
|
|
|
4113
4120
|
g: 0,
|
|
4114
4121
|
b: 0
|
|
4115
4122
|
}, L = 1, P = null, M = null, T = null, V = !1, K = !1;
|
|
4116
|
-
return typeof A == "string" && (A = ya(A)), m(A) == "object" && (Ce(A.r) && Ce(A.g) && Ce(A.b) ? (O = a(A.r, A.g, A.b), V = !0, K = String(A.r).substr(-1) === "%" ? "prgb" : "rgb") : Ce(A.h) && Ce(A.s) && Ce(A.v) ? (P = ne(A.s), M = ne(A.v), O = t(A.h, P, M), V = !0, K = "hsv") : Ce(A.h) && Ce(A.s) && Ce(A.l) && (P = ne(A.s), T = ne(A.l), O = h(A.h, P, T), V = !0, K = "hsl"), A.hasOwnProperty("a") && (L = A.a)), L =
|
|
4123
|
+
return typeof A == "string" && (A = ya(A)), m(A) == "object" && (Ce(A.r) && Ce(A.g) && Ce(A.b) ? (O = a(A.r, A.g, A.b), V = !0, K = String(A.r).substr(-1) === "%" ? "prgb" : "rgb") : Ce(A.h) && Ce(A.s) && Ce(A.v) ? (P = ne(A.s), M = ne(A.v), O = t(A.h, P, M), V = !0, K = "hsv") : Ce(A.h) && Ce(A.s) && Ce(A.l) && (P = ne(A.s), T = ne(A.l), O = h(A.h, P, T), V = !0, K = "hsl"), A.hasOwnProperty("a") && (L = A.a)), L = F(L), {
|
|
4117
4124
|
ok: V,
|
|
4118
4125
|
format: A.format || K,
|
|
4119
4126
|
r: Math.min(255, Math.max(O.r, 0)),
|
|
@@ -4124,13 +4131,13 @@ function oc() {
|
|
|
4124
4131
|
}
|
|
4125
4132
|
function a(A, O, L) {
|
|
4126
4133
|
return {
|
|
4127
|
-
r:
|
|
4128
|
-
g:
|
|
4129
|
-
b:
|
|
4134
|
+
r: B(A, 255) * 255,
|
|
4135
|
+
g: B(O, 255) * 255,
|
|
4136
|
+
b: B(L, 255) * 255
|
|
4130
4137
|
};
|
|
4131
4138
|
}
|
|
4132
4139
|
function o(A, O, L) {
|
|
4133
|
-
A =
|
|
4140
|
+
A = B(A, 255), O = B(O, 255), L = B(L, 255);
|
|
4134
4141
|
var P = Math.max(A, O, L), M = Math.min(A, O, L), T, V, K = (P + M) / 2;
|
|
4135
4142
|
if (P == M)
|
|
4136
4143
|
T = V = 0;
|
|
@@ -4157,7 +4164,7 @@ function oc() {
|
|
|
4157
4164
|
}
|
|
4158
4165
|
function h(A, O, L) {
|
|
4159
4166
|
var P, M, T;
|
|
4160
|
-
A =
|
|
4167
|
+
A = B(A, 360), O = B(O, 100), L = B(L, 100);
|
|
4161
4168
|
function V(me, Fe, ye) {
|
|
4162
4169
|
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
4170
|
}
|
|
@@ -4174,7 +4181,7 @@ function oc() {
|
|
|
4174
4181
|
};
|
|
4175
4182
|
}
|
|
4176
4183
|
function i(A, O, L) {
|
|
4177
|
-
A =
|
|
4184
|
+
A = B(A, 255), O = B(O, 255), L = B(L, 255);
|
|
4178
4185
|
var P = Math.max(A, O, L), M = Math.min(A, O, L), T, V, K = P, Q = P - M;
|
|
4179
4186
|
if (V = P === 0 ? 0 : Q / P, P == M)
|
|
4180
4187
|
T = 0;
|
|
@@ -4199,7 +4206,7 @@ function oc() {
|
|
|
4199
4206
|
};
|
|
4200
4207
|
}
|
|
4201
4208
|
function t(A, O, L) {
|
|
4202
|
-
A =
|
|
4209
|
+
A = B(A, 360) * 6, O = B(O, 100), L = B(L, 100);
|
|
4203
4210
|
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
4211
|
return {
|
|
4205
4212
|
r: me * 255,
|
|
@@ -4491,17 +4498,17 @@ function oc() {
|
|
|
4491
4498
|
whitesmoke: "f5f5f5",
|
|
4492
4499
|
yellow: "ff0",
|
|
4493
4500
|
yellowgreen: "9acd32"
|
|
4494
|
-
}, R = n.hexNames =
|
|
4495
|
-
function
|
|
4501
|
+
}, R = n.hexNames = q(I);
|
|
4502
|
+
function q(A) {
|
|
4496
4503
|
var O = {};
|
|
4497
4504
|
for (var L in A)
|
|
4498
4505
|
A.hasOwnProperty(L) && (O[A[L]] = L);
|
|
4499
4506
|
return O;
|
|
4500
4507
|
}
|
|
4501
|
-
function
|
|
4508
|
+
function F(A) {
|
|
4502
4509
|
return A = parseFloat(A), (isNaN(A) || A < 0 || A > 1) && (A = 1), A;
|
|
4503
4510
|
}
|
|
4504
|
-
function
|
|
4511
|
+
function B(A, O) {
|
|
4505
4512
|
Y(A) && (A = "100%");
|
|
4506
4513
|
var L = j(A);
|
|
4507
4514
|
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 +4965,7 @@ async function To() {
|
|
|
4958
4965
|
});
|
|
4959
4966
|
}
|
|
4960
4967
|
async function Ac() {
|
|
4961
|
-
const e = Object.entries(
|
|
4968
|
+
const e = Object.entries(D).filter(([, p]) => !Ha[p]).map(([, p]) => ({ value: p, label: p }));
|
|
4962
4969
|
return await Ul({
|
|
4963
4970
|
message: "Which template would you like to use?",
|
|
4964
4971
|
options: e
|
|
@@ -6101,7 +6108,7 @@ function Bc() {
|
|
|
6101
6108
|
return this.#g;
|
|
6102
6109
|
}
|
|
6103
6110
|
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:
|
|
6111
|
+
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: F, noDeleteOnStaleGet: B, allowStaleOnFetchRejection: G, allowStaleOnFetchAbort: k, ignoreFetchAbort: Y } = c;
|
|
6105
6112
|
if (u !== 0 && !a(u))
|
|
6106
6113
|
throw new TypeError("max option must be a nonnegative integer");
|
|
6107
6114
|
const j = u ? o(u) : Array;
|
|
@@ -6113,18 +6120,18 @@ function Bc() {
|
|
|
6113
6120
|
if (typeof this.sizeCalculation != "function")
|
|
6114
6121
|
throw new TypeError("sizeCalculation set to non-function");
|
|
6115
6122
|
}
|
|
6116
|
-
if (
|
|
6123
|
+
if (q !== void 0 && typeof q != "function")
|
|
6117
6124
|
throw new TypeError("memoMethod must be a function if defined");
|
|
6118
|
-
if (this.#P =
|
|
6125
|
+
if (this.#P = q, R !== void 0 && typeof R != "function")
|
|
6119
6126
|
throw new TypeError("fetchMethod must be a function if specified");
|
|
6120
|
-
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 = !!
|
|
6127
|
+
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 = !!F, this.allowStaleOnFetchRejection = !!G, this.allowStaleOnFetchAbort = !!k, this.ignoreFetchAbort = !!Y, this.maxEntrySize !== 0) {
|
|
6121
6128
|
if (this.#c !== 0 && !a(this.#c))
|
|
6122
6129
|
throw new TypeError("maxSize must be a positive integer if specified");
|
|
6123
6130
|
if (!a(this.maxEntrySize))
|
|
6124
6131
|
throw new TypeError("maxEntrySize must be a positive integer if specified");
|
|
6125
6132
|
this.#G();
|
|
6126
6133
|
}
|
|
6127
|
-
if (this.allowStale = !!y, this.noDeleteOnStaleGet = !!
|
|
6134
|
+
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
6135
|
if (!a(this.ttl))
|
|
6129
6136
|
throw new TypeError("ttl must be a positive integer if specified");
|
|
6130
6137
|
this.#R();
|
|
@@ -6587,21 +6594,21 @@ function Bc() {
|
|
|
6587
6594
|
options: d,
|
|
6588
6595
|
context: v
|
|
6589
6596
|
}, S = (I, R = !1) => {
|
|
6590
|
-
const { aborted:
|
|
6591
|
-
if (d.status && (
|
|
6597
|
+
const { aborted: q } = b.signal, F = d.ignoreFetchAbort && I !== void 0;
|
|
6598
|
+
if (d.status && (q && !R ? (d.status.fetchAborted = !0, d.status.fetchError = b.signal.reason, F && (d.status.fetchAbortIgnored = !0)) : d.status.fetchResolved = !0), q && !F && !R)
|
|
6592
6599
|
return E(b.signal.reason);
|
|
6593
|
-
const
|
|
6594
|
-
return this.#e[u] === _ && (I === void 0 ?
|
|
6600
|
+
const B = _;
|
|
6601
|
+
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
6602
|
}, 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] === _ && (!
|
|
6603
|
+
const { aborted: R } = b.signal, q = R && d.allowStaleOnFetchAbort, F = q || d.allowStaleOnFetchRejection, B = F || d.noDeleteOnFetchRejection, G = _;
|
|
6604
|
+
if (this.#e[u] === _ && (!B || G.__staleWhileFetching === void 0 ? this.#A(c, "fetch") : q || (this.#e[u] = G.__staleWhileFetching)), F)
|
|
6598
6605
|
return d.status && G.__staleWhileFetching !== void 0 && (d.status.returnedStale = !0), G.__staleWhileFetching;
|
|
6599
6606
|
if (G.__returned === G)
|
|
6600
6607
|
throw I;
|
|
6601
6608
|
}, $ = (I, R) => {
|
|
6602
|
-
const
|
|
6603
|
-
|
|
6604
|
-
(!d.ignoreFetchAbort || d.allowStaleOnFetchAbort) && (I(void 0), d.allowStaleOnFetchAbort && (I = (
|
|
6609
|
+
const q = this.#I?.(c, r, y);
|
|
6610
|
+
q && q instanceof Promise && q.then((F) => I(F === void 0 ? void 0 : F), R), b.signal.addEventListener("abort", () => {
|
|
6611
|
+
(!d.ignoreFetchAbort || d.allowStaleOnFetchAbort) && (I(void 0), d.allowStaleOnFetchAbort && (I = (F) => S(F, !0)));
|
|
6605
6612
|
});
|
|
6606
6613
|
};
|
|
6607
6614
|
d.status && (d.status.fetchDispatched = !0);
|
|
@@ -6637,17 +6644,17 @@ function Bc() {
|
|
|
6637
6644
|
allowStaleOnFetchAbort: N = this.allowStaleOnFetchAbort,
|
|
6638
6645
|
context: I,
|
|
6639
6646
|
forceRefresh: R = !1,
|
|
6640
|
-
status:
|
|
6641
|
-
signal:
|
|
6647
|
+
status: q,
|
|
6648
|
+
signal: F
|
|
6642
6649
|
} = u;
|
|
6643
6650
|
if (!this.#O)
|
|
6644
|
-
return
|
|
6651
|
+
return q && (q.fetch = "get"), this.get(c, {
|
|
6645
6652
|
allowStale: d,
|
|
6646
6653
|
updateAgeOnGet: v,
|
|
6647
6654
|
noDeleteOnStaleGet: r,
|
|
6648
|
-
status:
|
|
6655
|
+
status: q
|
|
6649
6656
|
});
|
|
6650
|
-
const
|
|
6657
|
+
const B = {
|
|
6651
6658
|
allowStale: d,
|
|
6652
6659
|
updateAgeOnGet: v,
|
|
6653
6660
|
noDeleteOnStaleGet: r,
|
|
@@ -6660,25 +6667,25 @@ function Bc() {
|
|
|
6660
6667
|
allowStaleOnFetchRejection: $,
|
|
6661
6668
|
allowStaleOnFetchAbort: N,
|
|
6662
6669
|
ignoreFetchAbort: _,
|
|
6663
|
-
status:
|
|
6664
|
-
signal:
|
|
6670
|
+
status: q,
|
|
6671
|
+
signal: F
|
|
6665
6672
|
};
|
|
6666
6673
|
let G = this.#r.get(c);
|
|
6667
6674
|
if (G === void 0) {
|
|
6668
|
-
|
|
6669
|
-
const k = this.#x(c, G,
|
|
6675
|
+
q && (q.fetch = "miss");
|
|
6676
|
+
const k = this.#x(c, G, B, I);
|
|
6670
6677
|
return k.__returned = k;
|
|
6671
6678
|
} else {
|
|
6672
6679
|
const k = this.#e[G];
|
|
6673
6680
|
if (this.#i(k)) {
|
|
6674
6681
|
const we = d && k.__staleWhileFetching !== void 0;
|
|
6675
|
-
return
|
|
6682
|
+
return q && (q.fetch = "inflight", we && (q.returnedStale = !0)), we ? k.__staleWhileFetching : k.__returned = k;
|
|
6676
6683
|
}
|
|
6677
6684
|
const Y = this.#m(G);
|
|
6678
6685
|
if (!R && !Y)
|
|
6679
|
-
return
|
|
6680
|
-
const j = this.#x(c, G,
|
|
6681
|
-
return
|
|
6686
|
+
return q && (q.fetch = "hit"), this.#N(G), v && this.#$(G), q && this.#L(q, G), k;
|
|
6687
|
+
const j = this.#x(c, G, B, I), ne = j.__staleWhileFetching !== void 0 && d;
|
|
6688
|
+
return q && (q.fetch = Y ? "stale" : "refresh", ne && Y && (q.returnedStale = !0)), ne ? j.__staleWhileFetching : j.__returned = j;
|
|
6682
6689
|
}
|
|
6683
6690
|
}
|
|
6684
6691
|
async forceFetch(c, u = {}) {
|
|
@@ -8361,19 +8368,19 @@ ${u}`) + "'";
|
|
|
8361
8368
|
`);
|
|
8362
8369
|
N === -1 ? E = "-" : u === _ || N !== _.length - 1 ? (E = "+", r && r()) : E = "", _ && (u = u.slice(0, -_.length), _[_.length - 1] === `
|
|
8363
8370
|
` && (_ = _.slice(0, -1)), _ = _.replace(o, `$&${S}`));
|
|
8364
|
-
let I = !1, R,
|
|
8371
|
+
let I = !1, R, q = -1;
|
|
8365
8372
|
for (R = 0; R < u.length; ++R) {
|
|
8366
8373
|
const k = u[R];
|
|
8367
8374
|
if (k === " ")
|
|
8368
8375
|
I = !0;
|
|
8369
8376
|
else if (k === `
|
|
8370
8377
|
`)
|
|
8371
|
-
|
|
8378
|
+
q = R;
|
|
8372
8379
|
else
|
|
8373
8380
|
break;
|
|
8374
8381
|
}
|
|
8375
|
-
let
|
|
8376
|
-
|
|
8382
|
+
let F = u.substring(0, q < R ? q + 1 : R);
|
|
8383
|
+
F && (u = u.substring(F.length), F = F.replace(/\n+/g, `$&${S}`));
|
|
8377
8384
|
let G = (I ? S ? "2" : "1" : "") + E;
|
|
8378
8385
|
if (l && (G += " " + w(l.replace(/ ?[\r\n]+/g, " ")), v && v()), !C) {
|
|
8379
8386
|
const k = u.replace(/\n+/g, `
|
|
@@ -8383,13 +8390,13 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/
|
|
|
8383
8390
|
b !== "folded" && c !== e.Scalar.BLOCK_FOLDED && (j.onOverflow = () => {
|
|
8384
8391
|
Y = !0;
|
|
8385
8392
|
});
|
|
8386
|
-
const U = p.foldFlowLines(`${
|
|
8393
|
+
const U = p.foldFlowLines(`${F}${k}${_}`, S, p.FOLD_BLOCK, j);
|
|
8387
8394
|
if (!Y)
|
|
8388
8395
|
return `>${G}
|
|
8389
8396
|
${S}${U}`;
|
|
8390
8397
|
}
|
|
8391
8398
|
return u = u.replace(/\n+/g, `$&${S}`), `|${G}
|
|
8392
|
-
${S}${
|
|
8399
|
+
${S}${F}${u}${_}`;
|
|
8393
8400
|
}
|
|
8394
8401
|
function i(l, c, u, d) {
|
|
8395
8402
|
const { type: v, value: r } = l, { actualString: b, implicitKey: w, indent: y, indentStep: S, inFlow: C } = c;
|
|
@@ -8597,13 +8604,13 @@ ${g.indentComment(R, a.indent)}`;
|
|
|
8597
8604
|
`) : I += `
|
|
8598
8605
|
${a.indent}`;
|
|
8599
8606
|
} else if (!b && e.isCollection(s)) {
|
|
8600
|
-
const R = N[0],
|
|
8601
|
-
`),
|
|
8602
|
-
if (
|
|
8607
|
+
const R = N[0], q = N.indexOf(`
|
|
8608
|
+
`), F = q !== -1, B = a.inFlow ?? s.flow ?? s.items.length === 0;
|
|
8609
|
+
if (F || !B) {
|
|
8603
8610
|
let G = !1;
|
|
8604
|
-
if (
|
|
8611
|
+
if (F && (R === "&" || R === "!")) {
|
|
8605
8612
|
let k = N.indexOf(" ");
|
|
8606
|
-
R === "&" && k !== -1 && k <
|
|
8613
|
+
R === "&" && k !== -1 && k < q && N[k + 1] === "!" && (k = N.indexOf(" ", k + 1)), (k === -1 || q < k) && (G = !0);
|
|
8607
8614
|
}
|
|
8608
8615
|
G || (I = `
|
|
8609
8616
|
${a.indent}`);
|
|
@@ -9806,8 +9813,8 @@ function Mu() {
|
|
|
9806
9813
|
return C && ($ = $.concat(i.merge)), $.reduce((_, N) => {
|
|
9807
9814
|
const I = typeof N == "string" ? r[N] : N;
|
|
9808
9815
|
if (!I) {
|
|
9809
|
-
const R = JSON.stringify(N),
|
|
9810
|
-
throw new Error(`Unknown custom tag ${R}; use one of ${
|
|
9816
|
+
const R = JSON.stringify(N), q = Object.keys(r).map((F) => JSON.stringify(F)).join(", ");
|
|
9817
|
+
throw new Error(`Unknown custom tag ${R}; use one of ${q}`);
|
|
9811
9818
|
}
|
|
9812
9819
|
return _.includes(I) || _.push(I), _;
|
|
9813
9820
|
}, []);
|
|
@@ -9946,8 +9953,8 @@ function Yt() {
|
|
|
9946
9953
|
if (typeof d == "function")
|
|
9947
9954
|
u = d.call({ "": u }, "", u), r = d;
|
|
9948
9955
|
else if (Array.isArray(d)) {
|
|
9949
|
-
const
|
|
9950
|
-
|
|
9956
|
+
const q = (B) => typeof B == "number" || B instanceof String || B instanceof Number, F = d.filter(q).map(String);
|
|
9957
|
+
F.length > 0 && (d = d.concat(F)), r = d;
|
|
9951
9958
|
} else v === void 0 && d && (v = d, d = void 0);
|
|
9952
9959
|
const { aliasDuplicateObjects: b, anchorPrefix: w, flow: y, keepUndefined: S, onTagObj: C, tag: E } = v ?? {}, { onAnchor: $, setAnchors: _, sourceObjects: N } = a.createNodeAnchors(
|
|
9953
9960
|
this,
|
|
@@ -10317,8 +10324,8 @@ function Fu() {
|
|
|
10317
10324
|
$ && (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
10325
|
const R = C ? o(i, C, I, l) : h(i, v, S, null, I, l);
|
|
10319
10326
|
i.schema.compat && f.flowIndentCheck(t.indent, C, l), v = R.range[2];
|
|
10320
|
-
const
|
|
10321
|
-
i.options.keepSourceTokens && (
|
|
10327
|
+
const q = new e.Pair(N, R);
|
|
10328
|
+
i.options.keepSourceTokens && (q.srcToken = b), d.items.push(q);
|
|
10322
10329
|
} else {
|
|
10323
10330
|
$ && l(N.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"), I.comment && (N.comment ? N.comment += `
|
|
10324
10331
|
` + I.comment : N.comment = I.comment);
|
|
@@ -10408,23 +10415,23 @@ function qu() {
|
|
|
10408
10415
|
S && (c.atRoot = !1), c.atKey && (c.atKey = !1);
|
|
10409
10416
|
let C = u.offset + u.start.source.length;
|
|
10410
10417
|
for (let I = 0; I < u.items.length; ++I) {
|
|
10411
|
-
const R = u.items[I], { start:
|
|
10418
|
+
const R = u.items[I], { start: q, key: F, sep: B, value: G } = R, k = n.resolveProps(q, {
|
|
10412
10419
|
flow: b,
|
|
10413
10420
|
indicator: "explicit-key-ind",
|
|
10414
|
-
next:
|
|
10421
|
+
next: F ?? B?.[0],
|
|
10415
10422
|
offset: C,
|
|
10416
10423
|
onError: d,
|
|
10417
10424
|
parentIndent: u.indent,
|
|
10418
10425
|
startOnNewline: !1
|
|
10419
10426
|
});
|
|
10420
10427
|
if (!k.found) {
|
|
10421
|
-
if (!k.anchor && !k.tag && !
|
|
10428
|
+
if (!k.anchor && !k.tag && !B && !G) {
|
|
10422
10429
|
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
10430
|
` + k.comment : y.comment = k.comment), C = k.end;
|
|
10424
10431
|
continue;
|
|
10425
10432
|
}
|
|
10426
|
-
!r && c.options.strict && s.containsNewline(
|
|
10427
|
-
|
|
10433
|
+
!r && c.options.strict && s.containsNewline(F) && d(
|
|
10434
|
+
F,
|
|
10428
10435
|
// checked by containsNewline()
|
|
10429
10436
|
"MULTILINE_IMPLICIT_KEY",
|
|
10430
10437
|
"Implicit keys of flow sequence pairs need to be on a single line"
|
|
@@ -10434,7 +10441,7 @@ function qu() {
|
|
|
10434
10441
|
k.comma && d(k.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${b}`);
|
|
10435
10442
|
else if (k.comma || d(k.start, "MISSING_CHAR", `Missing , between ${b} items`), k.comment) {
|
|
10436
10443
|
let Y = "";
|
|
10437
|
-
e: for (const j of
|
|
10444
|
+
e: for (const j of q)
|
|
10438
10445
|
switch (j.type) {
|
|
10439
10446
|
case "comma":
|
|
10440
10447
|
case "space":
|
|
@@ -10451,14 +10458,14 @@ function qu() {
|
|
|
10451
10458
|
` + Y : j.comment = Y, k.comment = k.comment.substring(Y.length + 1);
|
|
10452
10459
|
}
|
|
10453
10460
|
}
|
|
10454
|
-
if (!r && !
|
|
10455
|
-
const Y = G ? t(c, G, k, d) : l(c, k.end,
|
|
10461
|
+
if (!r && !B && !k.found) {
|
|
10462
|
+
const Y = G ? t(c, G, k, d) : l(c, k.end, B, null, k, d);
|
|
10456
10463
|
y.items.push(Y), C = Y.range[2], h(G) && d(Y.range, "BLOCK_IN_FLOW", o);
|
|
10457
10464
|
} else {
|
|
10458
10465
|
c.atKey = !0;
|
|
10459
|
-
const Y = k.end, j =
|
|
10460
|
-
h(
|
|
10461
|
-
const U = n.resolveProps(
|
|
10466
|
+
const Y = k.end, j = F ? t(c, F, k, d) : l(c, Y, q, null, k, d);
|
|
10467
|
+
h(F) && d(j.range, "BLOCK_IN_FLOW", o), c.atKey = !1;
|
|
10468
|
+
const U = n.resolveProps(B ?? [], {
|
|
10462
10469
|
flow: b,
|
|
10463
10470
|
indicator: "map-value-ind",
|
|
10464
10471
|
next: G,
|
|
@@ -10469,8 +10476,8 @@ function qu() {
|
|
|
10469
10476
|
});
|
|
10470
10477
|
if (U.found) {
|
|
10471
10478
|
if (!r && !k.found && c.options.strict) {
|
|
10472
|
-
if (
|
|
10473
|
-
for (const ce of
|
|
10479
|
+
if (B)
|
|
10480
|
+
for (const ce of B) {
|
|
10474
10481
|
if (ce === U.found)
|
|
10475
10482
|
break;
|
|
10476
10483
|
if (ce.type === "newline") {
|
|
@@ -10481,7 +10488,7 @@ function qu() {
|
|
|
10481
10488
|
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
10489
|
}
|
|
10483
10490
|
} 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,
|
|
10491
|
+
const ne = G ? t(c, G, U, d) : U.found ? l(c, U.end, B, null, U, d) : null;
|
|
10485
10492
|
ne ? h(G) && d(ne.range, "BLOCK_IN_FLOW", o) : U.comment && (j.comment ? j.comment += `
|
|
10486
10493
|
` + U.comment : j.comment = U.comment);
|
|
10487
10494
|
const we = new p.Pair(j, ne);
|
|
@@ -11153,7 +11160,7 @@ ${l.comment}` : l.comment;
|
|
|
11153
11160
|
}
|
|
11154
11161
|
return _i.Composer = h, _i;
|
|
11155
11162
|
}
|
|
11156
|
-
var
|
|
11163
|
+
var oe = {}, Ke = {}, to;
|
|
11157
11164
|
function Wu() {
|
|
11158
11165
|
if (to) return Ke;
|
|
11159
11166
|
to = 1;
|
|
@@ -11419,7 +11426,7 @@ function Ku() {
|
|
|
11419
11426
|
}
|
|
11420
11427
|
var so;
|
|
11421
11428
|
function Yn() {
|
|
11422
|
-
if (so) return
|
|
11429
|
+
if (so) return oe;
|
|
11423
11430
|
so = 1;
|
|
11424
11431
|
var e = Wu(), p = Yu(), m = Ku();
|
|
11425
11432
|
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 +11505,7 @@ function Yn() {
|
|
|
11498
11505
|
}
|
|
11499
11506
|
return null;
|
|
11500
11507
|
}
|
|
11501
|
-
return
|
|
11508
|
+
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
11509
|
}
|
|
11503
11510
|
var gn = {}, ro;
|
|
11504
11511
|
function la() {
|
|
@@ -12791,7 +12798,7 @@ const rf = (e) => {
|
|
|
12791
12798
|
}
|
|
12792
12799
|
case "template": {
|
|
12793
12800
|
const f = e.template, n = f?.toLowerCase();
|
|
12794
|
-
if (!n || !Object.values(
|
|
12801
|
+
if (!n || !Object.values(D).includes(n))
|
|
12795
12802
|
throw new Error(`Invalid template: ${f}`);
|
|
12796
12803
|
p.template = n;
|
|
12797
12804
|
break;
|
|
@@ -12841,7 +12848,7 @@ function lf(e, p) {
|
|
|
12841
12848
|
}
|
|
12842
12849
|
function cf(e, p) {
|
|
12843
12850
|
const m = Ga[e];
|
|
12844
|
-
if (p ===
|
|
12851
|
+
if (p === D.luminaComponents)
|
|
12845
12852
|
throw new Error(`Template "${p}" is not available for domain "${e}"`);
|
|
12846
12853
|
const g = m[p];
|
|
12847
12854
|
if (!g)
|
|
@@ -12952,7 +12959,7 @@ Happy mapping!`));
|
|
|
12952
12959
|
}
|
|
12953
12960
|
async function ff(e) {
|
|
12954
12961
|
const { template: p, branch: m = Nn } = e;
|
|
12955
|
-
p !==
|
|
12962
|
+
p !== D.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
12963
|
const g = da(e);
|
|
12957
12964
|
try {
|
|
12958
12965
|
ko();
|
|
@@ -13020,7 +13027,7 @@ const ga = (e) => {
|
|
|
13020
13027
|
writeErr: () => ""
|
|
13021
13028
|
}), 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
13029
|
const m = rf(p.opts());
|
|
13023
|
-
if (m.template && Ua[m.template] ===
|
|
13030
|
+
if (m.template && Ua[m.template] === se.codeSample) {
|
|
13024
13031
|
await ff(m);
|
|
13025
13032
|
return;
|
|
13026
13033
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/create",
|
|
3
|
-
"version": "5.0.
|
|
4
|
-
"description": "ArcGIS
|
|
3
|
+
"version": "5.0.1",
|
|
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",
|