@powerlines/plugin-env 0.16.290 → 0.16.292
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/_virtual/_rolldown/runtime.cjs +14 -0
- package/dist/_virtual/_rolldown/runtime.mjs +18 -0
- package/dist/babel/plugin.cjs +11 -3
- package/dist/babel/plugin.mjs +5 -3
- package/dist/babel/plugin.mjs.map +1 -1
- package/dist/babel/plugin.test.cjs +16 -0
- package/dist/babel/plugin.test.d.cts +1 -0
- package/dist/babel/plugin.test.d.mts +1 -0
- package/dist/babel/plugin.test.mjs +18 -0
- package/dist/babel/plugin.test.mjs.map +1 -0
- package/dist/components/docs.cjs +14 -3
- package/dist/components/docs.mjs +8 -3
- package/dist/components/docs.mjs.map +1 -1
- package/dist/components/docs.test.cjs +16 -0
- package/dist/components/docs.test.d.cts +1 -0
- package/dist/components/docs.test.d.mts +1 -0
- package/dist/components/docs.test.mjs +18 -0
- package/dist/components/docs.test.mjs.map +1 -0
- package/dist/components/env-builtin.cjs +15 -3
- package/dist/components/env-builtin.d.cts.map +1 -1
- package/dist/components/env-builtin.d.mts.map +1 -1
- package/dist/components/env-builtin.mjs +9 -3
- package/dist/components/env-builtin.mjs.map +1 -1
- package/dist/components/env-builtin.test.cjs +16 -0
- package/dist/components/env-builtin.test.d.cts +1 -0
- package/dist/components/env-builtin.test.d.mts +1 -0
- package/dist/components/env-builtin.test.mjs +18 -0
- package/dist/components/env-builtin.test.mjs.map +1 -0
- package/dist/helpers/automd-generator.cjs +9 -1
- package/dist/helpers/automd-generator.mjs +4 -2
- package/dist/helpers/automd-generator.mjs.map +1 -1
- package/dist/helpers/automd-generator.test.cjs +16 -0
- package/dist/helpers/automd-generator.test.d.cts +1 -0
- package/dist/helpers/automd-generator.test.d.mts +1 -0
- package/dist/helpers/automd-generator.test.mjs +18 -0
- package/dist/helpers/automd-generator.test.mjs.map +1 -0
- package/dist/helpers/index.cjs +1 -1
- package/dist/helpers/index.mjs +1 -1
- package/dist/helpers/load.cjs +13 -3
- package/dist/helpers/load.d.cts.map +1 -1
- package/dist/helpers/load.d.mts.map +1 -1
- package/dist/helpers/load.mjs +7 -2
- package/dist/helpers/load.mjs.map +1 -1
- package/dist/helpers/load.test.cjs +16 -0
- package/dist/helpers/load.test.d.cts +1 -0
- package/dist/helpers/load.test.d.mts +1 -0
- package/dist/helpers/load.test.mjs +18 -0
- package/dist/helpers/load.test.mjs.map +1 -0
- package/dist/helpers/schema.cjs +18 -2
- package/dist/helpers/schema.d.cts.map +1 -1
- package/dist/helpers/schema.d.mts.map +1 -1
- package/dist/helpers/schema.mjs +13 -3
- package/dist/helpers/schema.mjs.map +1 -1
- package/dist/helpers/schema.test.cjs +16 -0
- package/dist/helpers/schema.test.d.cts +1 -0
- package/dist/helpers/schema.test.d.mts +1 -0
- package/dist/helpers/schema.test.mjs +18 -0
- package/dist/helpers/schema.test.mjs.map +1 -0
- package/dist/helpers/source-file-env.cjs +12 -1
- package/dist/helpers/source-file-env.d.cts.map +1 -1
- package/dist/helpers/source-file-env.d.mts.map +1 -1
- package/dist/helpers/source-file-env.mjs +6 -1
- package/dist/helpers/source-file-env.mjs.map +1 -1
- package/dist/helpers/source-file-env.test.cjs +16 -0
- package/dist/helpers/source-file-env.test.d.cts +1 -0
- package/dist/helpers/source-file-env.test.d.mts +1 -0
- package/dist/helpers/source-file-env.test.mjs +18 -0
- package/dist/helpers/source-file-env.test.mjs.map +1 -0
- package/dist/index.cjs +9 -9
- package/dist/index.mjs +8 -8
- package/dist/index.test.cjs +30 -0
- package/dist/index.test.d.cts +1 -0
- package/dist/index.test.d.mts +1 -0
- package/dist/index.test.mjs +32 -0
- package/dist/index.test.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.cjs +78 -0
- package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +78 -0
- package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_expect@4.1.7/node_modules/@vitest/expect/dist/index.cjs +1487 -0
- package/dist/node_modules/.pnpm/@vitest_expect@4.1.7/node_modules/@vitest/expect/dist/index.mjs +1473 -0
- package/dist/node_modules/.pnpm/@vitest_expect@4.1.7/node_modules/@vitest/expect/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_pretty-format@4.1.7/node_modules/@vitest/pretty-format/dist/index.cjs +889 -0
- package/dist/node_modules/.pnpm/@vitest_pretty-format@4.1.7/node_modules/@vitest/pretty-format/dist/index.mjs +888 -0
- package/dist/node_modules/.pnpm/@vitest_pretty-format@4.1.7/node_modules/@vitest/pretty-format/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/chunk-artifact.cjs +1614 -0
- package/dist/node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/chunk-artifact.mjs +1594 -0
- package/dist/node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/chunk-artifact.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/index.mjs +3 -0
- package/dist/node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/utils.cjs +1 -0
- package/dist/node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/utils.mjs +3 -0
- package/dist/node_modules/.pnpm/@vitest_snapshot@4.1.7/node_modules/@vitest/snapshot/dist/index.cjs +923 -0
- package/dist/node_modules/.pnpm/@vitest_snapshot@4.1.7/node_modules/@vitest/snapshot/dist/index.mjs +922 -0
- package/dist/node_modules/.pnpm/@vitest_snapshot@4.1.7/node_modules/@vitest/snapshot/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_spy@4.1.7/node_modules/@vitest/spy/dist/index.cjs +391 -0
- package/dist/node_modules/.pnpm/@vitest_spy@4.1.7/node_modules/@vitest/spy/dist/index.mjs +386 -0
- package/dist/node_modules/.pnpm/@vitest_spy@4.1.7/node_modules/@vitest/spy/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.cjs +82 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.mjs +82 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/diff.cjs +1358 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/diff.mjs +1357 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/diff.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/display.cjs +561 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/display.mjs +559 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/display.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/error.cjs +37 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/error.mjs +38 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/error.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/helpers.cjs +197 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/helpers.mjs +181 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/helpers.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/offset.cjs +29 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/offset.mjs +27 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/offset.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/serialize.cjs +77 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/serialize.mjs +77 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/serialize.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/source-map.cjs +374 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/source-map.mjs +374 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/source-map.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/timers.cjs +38 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/timers.mjs +37 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/timers.mjs.map +1 -0
- package/dist/node_modules/.pnpm/chai@6.2.2/node_modules/chai/index.cjs +2978 -0
- package/dist/node_modules/.pnpm/chai@6.2.2/node_modules/chai/index.mjs +2973 -0
- package/dist/node_modules/.pnpm/chai@6.2.2/node_modules/chai/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.cjs +939 -0
- package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs +940 -0
- package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs.map +1 -0
- package/dist/node_modules/.pnpm/tinyrainbow@3.1.0/node_modules/tinyrainbow/dist/index.cjs +87 -0
- package/dist/node_modules/.pnpm/tinyrainbow@3.1.0/node_modules/tinyrainbow/dist/index.mjs +87 -0
- package/dist/node_modules/.pnpm/tinyrainbow@3.1.0/node_modules/tinyrainbow/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.cjs +6 -0
- package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.mjs +6 -0
- package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.mjs.map +1 -0
- package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/rpc.MzXet3jl.cjs +54 -0
- package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/rpc.MzXet3jl.mjs +52 -0
- package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/rpc.MzXet3jl.mjs.map +1 -0
- package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/test.DNmyFkvJ.cjs +2696 -0
- package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/test.DNmyFkvJ.mjs +2697 -0
- package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/test.DNmyFkvJ.mjs.map +1 -0
- package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.cjs +47 -0
- package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.mjs +45 -0
- package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.mjs.map +1 -0
- package/dist/types/plugin.d.mts +1 -1
- package/package.json +145 -20
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const require_chunk_artifact = require('../node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/chunk-artifact.cjs');
|
|
2
|
+
const require_test_DNmyFkvJ = require('../node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/test.DNmyFkvJ.cjs');
|
|
3
|
+
const require_helpers_source_file_env = require('./source-file-env.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/helpers/source-file-env.test.ts
|
|
6
|
+
require_chunk_artifact.describe("plugins/plugin-env/src/helpers/source-file-env.ts", () => {
|
|
7
|
+
require_chunk_artifact.it("loads module exports", () => {
|
|
8
|
+
require_test_DNmyFkvJ.globalExpect(require_helpers_source_file_env.source_file_env_exports).toBeDefined();
|
|
9
|
+
require_test_DNmyFkvJ.globalExpect(typeof require_helpers_source_file_env.source_file_env_exports).toBe("object");
|
|
10
|
+
});
|
|
11
|
+
require_chunk_artifact.it("has at least one runtime export", () => {
|
|
12
|
+
require_test_DNmyFkvJ.globalExpect(Object.keys(require_helpers_source_file_env.source_file_env_exports).length).toBeGreaterThan(0);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { describe, it } from "../node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/chunk-artifact.mjs";
|
|
2
|
+
import { globalExpect } from "../node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/test.DNmyFkvJ.mjs";
|
|
3
|
+
import { source_file_env_exports } from "./source-file-env.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/helpers/source-file-env.test.ts
|
|
6
|
+
describe("plugins/plugin-env/src/helpers/source-file-env.ts", () => {
|
|
7
|
+
it("loads module exports", () => {
|
|
8
|
+
globalExpect(source_file_env_exports).toBeDefined();
|
|
9
|
+
globalExpect(typeof source_file_env_exports).toBe("object");
|
|
10
|
+
});
|
|
11
|
+
it("has at least one runtime export", () => {
|
|
12
|
+
globalExpect(Object.keys(source_file_env_exports).length).toBeGreaterThan(0);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { };
|
|
18
|
+
//# sourceMappingURL=source-file-env.test.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-file-env.test.mjs","names":[],"sources":["../../src/helpers/source-file-env.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./source-file-env\";\n\ndescribe(\"plugins/plugin-env/src/helpers/source-file-env.ts\", () => {\n it(\"loads module exports\", () => {\n expect(moduleExports).toBeDefined();\n expect(typeof moduleExports).toBe(\"object\");\n });\n\n it(\"has at least one runtime export\", () => {\n expect(Object.keys(moduleExports).length).toBeGreaterThan(0);\n });\n});\n"],"mappings":";;;;;;CAGA,GAAA,8BAAiC;EAC7B,aAAO,uBAAQ,EAAO,YAAS;EAC/B,aAAO,OAAA,uBAAe,EAAA,KAAY,QAAC;CACrC,CAAC;CACD,GAAE,yCAAA;;CAEF,CAAA;AACF,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
2
|
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
3
|
const require_types_plugin = require('./types/plugin.cjs');
|
|
4
|
-
const
|
|
5
|
-
const require_helpers_schema = require('./helpers/schema.cjs');
|
|
6
|
-
const require_helpers_automd_generator = require('./helpers/automd-generator.cjs');
|
|
4
|
+
const require_babel_plugin = require('./babel/plugin.cjs');
|
|
7
5
|
const require_components_docs = require('./components/docs.cjs');
|
|
8
6
|
const require_components_env_builtin = require('./components/env-builtin.cjs');
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
defu = require_runtime.__toESM(defu);
|
|
13
|
-
let powerlines_plugin_utils = require("powerlines/plugin-utils");
|
|
7
|
+
const require_helpers_automd_generator = require('./helpers/automd-generator.cjs');
|
|
8
|
+
const require_helpers_schema = require('./helpers/schema.cjs');
|
|
9
|
+
const require_types_env = require('./types/env.cjs');
|
|
14
10
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
15
|
-
let _stryke_helpers_get_unique = require("@stryke/helpers/get-unique");
|
|
16
11
|
let _powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
|
|
17
12
|
let _powerlines_plugin_automd = require("@powerlines/plugin-automd");
|
|
18
13
|
_powerlines_plugin_automd = require_runtime.__toESM(_powerlines_plugin_automd);
|
|
19
14
|
let _powerlines_plugin_babel = require("@powerlines/plugin-babel");
|
|
20
15
|
_powerlines_plugin_babel = require_runtime.__toESM(_powerlines_plugin_babel);
|
|
21
16
|
let _stryke_convert_to_array = require("@stryke/convert/to-array");
|
|
17
|
+
let _stryke_helpers_get_unique = require("@stryke/helpers/get-unique");
|
|
18
|
+
let _stryke_path_join = require("@stryke/path/join");
|
|
22
19
|
let _stryke_string_format_constant_case = require("@stryke/string-format/constant-case");
|
|
20
|
+
let defu = require("defu");
|
|
21
|
+
defu = require_runtime.__toESM(defu);
|
|
22
|
+
let powerlines_plugin_utils = require("powerlines/plugin-utils");
|
|
23
23
|
|
|
24
24
|
//#region src/index.tsx
|
|
25
25
|
function __assignType(fn, args) {
|
package/dist/index.mjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvSchema, __ΩEnvType } from "./types/plugin.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { extractEnv, getDefaultConfig, getDefaultSecrets, writeEnv } from "./helpers/schema.mjs";
|
|
4
|
-
import { env } from "./helpers/automd-generator.mjs";
|
|
2
|
+
import { envBabelPlugin } from "./babel/plugin.mjs";
|
|
5
3
|
import { EnvDocsFile } from "./components/docs.mjs";
|
|
6
4
|
import { EnvBuiltin } from "./components/env-builtin.mjs";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import { getDocsOutputPath } from "powerlines/plugin-utils";
|
|
5
|
+
import { env } from "./helpers/automd-generator.mjs";
|
|
6
|
+
import { extractEnv, getDefaultConfig, getDefaultSecrets, writeEnv } from "./helpers/schema.mjs";
|
|
7
|
+
import { __ΩEnvInterface, __ΩSecretsInterface } from "./types/env.mjs";
|
|
11
8
|
import { createComponent } from "@alloy-js/core/jsx-runtime";
|
|
12
|
-
import { getUnique } from "@stryke/helpers/get-unique";
|
|
13
9
|
import { render } from "@powerlines/plugin-alloy/render";
|
|
14
10
|
import automd from "@powerlines/plugin-automd";
|
|
15
11
|
import babel from "@powerlines/plugin-babel";
|
|
16
12
|
import { toArray } from "@stryke/convert/to-array";
|
|
13
|
+
import { getUnique } from "@stryke/helpers/get-unique";
|
|
14
|
+
import { joinPaths } from "@stryke/path/join";
|
|
17
15
|
import { constantCase } from "@stryke/string-format/constant-case";
|
|
16
|
+
import defu from "defu";
|
|
17
|
+
import { getDocsOutputPath } from "powerlines/plugin-utils";
|
|
18
18
|
|
|
19
19
|
//#region src/index.tsx
|
|
20
20
|
function __assignType(fn, args) {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const require_chunk_artifact = require('./node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/chunk-artifact.cjs');
|
|
2
|
+
const require_test_DNmyFkvJ = require('./node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/test.DNmyFkvJ.cjs');
|
|
3
|
+
const require_index = require('./index.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/index.test.ts
|
|
6
|
+
require_chunk_artifact.describe("env plugin", () => {
|
|
7
|
+
require_chunk_artifact.it("plugin is a function", () => {
|
|
8
|
+
require_test_DNmyFkvJ.globalExpect(typeof require_index.default).toBe("function");
|
|
9
|
+
});
|
|
10
|
+
require_chunk_artifact.it("plugin() returns an object", () => {
|
|
11
|
+
const result = require_index.default();
|
|
12
|
+
require_test_DNmyFkvJ.globalExpect(typeof result).toBe("object");
|
|
13
|
+
require_test_DNmyFkvJ.globalExpect(result).not.toBeNull();
|
|
14
|
+
});
|
|
15
|
+
require_chunk_artifact.it("plugin() returns an object with a name property", () => {
|
|
16
|
+
const result = require_index.default();
|
|
17
|
+
require_test_DNmyFkvJ.globalExpect(result).toHaveProperty("name");
|
|
18
|
+
require_test_DNmyFkvJ.globalExpect(typeof result.name).toBe("string");
|
|
19
|
+
});
|
|
20
|
+
require_chunk_artifact.it("plugin() accepts an empty options object", () => {
|
|
21
|
+
require_test_DNmyFkvJ.globalExpect(() => require_index.default({})).not.toThrow();
|
|
22
|
+
});
|
|
23
|
+
require_chunk_artifact.it("plugin() returns the same name for all calls", () => {
|
|
24
|
+
const r1 = require_index.default();
|
|
25
|
+
const r2 = require_index.default({});
|
|
26
|
+
require_test_DNmyFkvJ.globalExpect(r1.name).toBe(r2.name);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { describe, it } from "./node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/chunk-artifact.mjs";
|
|
2
|
+
import { globalExpect } from "./node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/test.DNmyFkvJ.mjs";
|
|
3
|
+
import plugin from "./index.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/index.test.ts
|
|
6
|
+
describe("env plugin", () => {
|
|
7
|
+
it("plugin is a function", () => {
|
|
8
|
+
globalExpect(typeof plugin).toBe("function");
|
|
9
|
+
});
|
|
10
|
+
it("plugin() returns an object", () => {
|
|
11
|
+
const result = plugin();
|
|
12
|
+
globalExpect(typeof result).toBe("object");
|
|
13
|
+
globalExpect(result).not.toBeNull();
|
|
14
|
+
});
|
|
15
|
+
it("plugin() returns an object with a name property", () => {
|
|
16
|
+
const result = plugin();
|
|
17
|
+
globalExpect(result).toHaveProperty("name");
|
|
18
|
+
globalExpect(typeof result.name).toBe("string");
|
|
19
|
+
});
|
|
20
|
+
it("plugin() accepts an empty options object", () => {
|
|
21
|
+
globalExpect(() => plugin({})).not.toThrow();
|
|
22
|
+
});
|
|
23
|
+
it("plugin() returns the same name for all calls", () => {
|
|
24
|
+
const r1 = plugin();
|
|
25
|
+
const r2 = plugin({});
|
|
26
|
+
globalExpect(r1.name).toBe(r2.name);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
export { };
|
|
32
|
+
//# sourceMappingURL=index.test.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.test.mjs","names":[],"sources":["../src/index.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport { plugin } from \"./index\";\n\ndescribe(\"env plugin\", () => {\n it(\"plugin is a function\", () => {\n expect(typeof plugin).toBe(\"function\");\n });\n\n it(\"plugin() returns an object\", () => {\n const result = plugin();\n expect(typeof result).toBe(\"object\");\n expect(result).not.toBeNull();\n });\n\n it(\"plugin() returns an object with a name property\", () => {\n const result = plugin();\n expect(result).toHaveProperty(\"name\");\n expect(typeof result.name).toBe(\"string\");\n });\n\n it(\"plugin() accepts an empty options object\", () => {\n expect(() => plugin({})).not.toThrow();\n });\n\n it(\"plugin() returns the same name for all calls\", () => {\n const r1 = plugin();\n const r2 = plugin({});\n expect(r1.name).toBe(r2.name);\n });\n});\n"],"mappings":";;;;;;CAGA,GAAA,8BAA6B;EACzB,aAAE,OAAY,MAAA,EAAQ,KAAK,UAAI;CACjC,CAAC;CACD,GAAE,oCAAA;;EAEA,aAAE,OAAS,MAAQ,EAAG,KAAA,QAAa;EACnC,aAAM,MAAO,EAAE,IAAA,SAAQ;CACzB,CAAC;CACD,GAAE,yDAA6B;EAC7B,MAAA,SAAA,OAAA;;EAEA,aAAE,OAAS,OAAU,IAAC,EAAA,KAAO,QAAW;CAC1C,CAAC;CACD,GAAE,kDAAqC;EACrC,mBAAa,OAAO,CAAC,CAAA,CAAA,EAAI,IAAE,QAAM;CACnC,CAAC;;EAEC,MAAE,KAAS,OAAO;EAClB,MAAM,KAAK,OAAE,CAAM,CAAC;EACpB,aAAA,GAAA,IAAA,EAAA,KAAA,GAAA,IAAA;;AAEJ,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
|
|
2
|
+
//#region ../../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
|
|
3
|
+
var comma = ",".charCodeAt(0);
|
|
4
|
+
var semicolon = ";".charCodeAt(0);
|
|
5
|
+
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
6
|
+
var intToChar = new Uint8Array(64);
|
|
7
|
+
var charToInt = new Uint8Array(128);
|
|
8
|
+
for (let i = 0; i < chars.length; i++) {
|
|
9
|
+
const c = chars.charCodeAt(i);
|
|
10
|
+
intToChar[i] = c;
|
|
11
|
+
charToInt[c] = i;
|
|
12
|
+
}
|
|
13
|
+
function encodeInteger(builder, num, relative) {
|
|
14
|
+
let delta = num - relative;
|
|
15
|
+
delta = delta < 0 ? -delta << 1 | 1 : delta << 1;
|
|
16
|
+
do {
|
|
17
|
+
let clamped = delta & 31;
|
|
18
|
+
delta >>>= 5;
|
|
19
|
+
if (delta > 0) clamped |= 32;
|
|
20
|
+
builder.write(intToChar[clamped]);
|
|
21
|
+
} while (delta > 0);
|
|
22
|
+
return num;
|
|
23
|
+
}
|
|
24
|
+
var bufLength = 1024 * 16;
|
|
25
|
+
var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? { decode(buf) {
|
|
26
|
+
return Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength).toString();
|
|
27
|
+
} } : { decode(buf) {
|
|
28
|
+
let out = "";
|
|
29
|
+
for (let i = 0; i < buf.length; i++) out += String.fromCharCode(buf[i]);
|
|
30
|
+
return out;
|
|
31
|
+
} };
|
|
32
|
+
var StringWriter = class {
|
|
33
|
+
constructor() {
|
|
34
|
+
this.pos = 0;
|
|
35
|
+
this.out = "";
|
|
36
|
+
this.buffer = new Uint8Array(bufLength);
|
|
37
|
+
}
|
|
38
|
+
write(v) {
|
|
39
|
+
const { buffer } = this;
|
|
40
|
+
buffer[this.pos++] = v;
|
|
41
|
+
if (this.pos === bufLength) {
|
|
42
|
+
this.out += td.decode(buffer);
|
|
43
|
+
this.pos = 0;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
flush() {
|
|
47
|
+
const { buffer, out, pos } = this;
|
|
48
|
+
return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
function encode(decoded) {
|
|
52
|
+
const writer = new StringWriter();
|
|
53
|
+
let sourcesIndex = 0;
|
|
54
|
+
let sourceLine = 0;
|
|
55
|
+
let sourceColumn = 0;
|
|
56
|
+
let namesIndex = 0;
|
|
57
|
+
for (let i = 0; i < decoded.length; i++) {
|
|
58
|
+
const line = decoded[i];
|
|
59
|
+
if (i > 0) writer.write(semicolon);
|
|
60
|
+
if (line.length === 0) continue;
|
|
61
|
+
let genColumn = 0;
|
|
62
|
+
for (let j = 0; j < line.length; j++) {
|
|
63
|
+
const segment = line[j];
|
|
64
|
+
if (j > 0) writer.write(comma);
|
|
65
|
+
genColumn = encodeInteger(writer, segment[0], genColumn);
|
|
66
|
+
if (segment.length === 1) continue;
|
|
67
|
+
sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
|
|
68
|
+
sourceLine = encodeInteger(writer, segment[2], sourceLine);
|
|
69
|
+
sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
|
|
70
|
+
if (segment.length === 4) continue;
|
|
71
|
+
namesIndex = encodeInteger(writer, segment[4], namesIndex);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return writer.flush();
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
//#endregion
|
|
78
|
+
exports.encode = encode;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
//#region ../../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
|
|
2
|
+
var comma = ",".charCodeAt(0);
|
|
3
|
+
var semicolon = ";".charCodeAt(0);
|
|
4
|
+
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
5
|
+
var intToChar = new Uint8Array(64);
|
|
6
|
+
var charToInt = new Uint8Array(128);
|
|
7
|
+
for (let i = 0; i < chars.length; i++) {
|
|
8
|
+
const c = chars.charCodeAt(i);
|
|
9
|
+
intToChar[i] = c;
|
|
10
|
+
charToInt[c] = i;
|
|
11
|
+
}
|
|
12
|
+
function encodeInteger(builder, num, relative) {
|
|
13
|
+
let delta = num - relative;
|
|
14
|
+
delta = delta < 0 ? -delta << 1 | 1 : delta << 1;
|
|
15
|
+
do {
|
|
16
|
+
let clamped = delta & 31;
|
|
17
|
+
delta >>>= 5;
|
|
18
|
+
if (delta > 0) clamped |= 32;
|
|
19
|
+
builder.write(intToChar[clamped]);
|
|
20
|
+
} while (delta > 0);
|
|
21
|
+
return num;
|
|
22
|
+
}
|
|
23
|
+
var bufLength = 1024 * 16;
|
|
24
|
+
var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? { decode(buf) {
|
|
25
|
+
return Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength).toString();
|
|
26
|
+
} } : { decode(buf) {
|
|
27
|
+
let out = "";
|
|
28
|
+
for (let i = 0; i < buf.length; i++) out += String.fromCharCode(buf[i]);
|
|
29
|
+
return out;
|
|
30
|
+
} };
|
|
31
|
+
var StringWriter = class {
|
|
32
|
+
constructor() {
|
|
33
|
+
this.pos = 0;
|
|
34
|
+
this.out = "";
|
|
35
|
+
this.buffer = new Uint8Array(bufLength);
|
|
36
|
+
}
|
|
37
|
+
write(v) {
|
|
38
|
+
const { buffer } = this;
|
|
39
|
+
buffer[this.pos++] = v;
|
|
40
|
+
if (this.pos === bufLength) {
|
|
41
|
+
this.out += td.decode(buffer);
|
|
42
|
+
this.pos = 0;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
flush() {
|
|
46
|
+
const { buffer, out, pos } = this;
|
|
47
|
+
return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
function encode(decoded) {
|
|
51
|
+
const writer = new StringWriter();
|
|
52
|
+
let sourcesIndex = 0;
|
|
53
|
+
let sourceLine = 0;
|
|
54
|
+
let sourceColumn = 0;
|
|
55
|
+
let namesIndex = 0;
|
|
56
|
+
for (let i = 0; i < decoded.length; i++) {
|
|
57
|
+
const line = decoded[i];
|
|
58
|
+
if (i > 0) writer.write(semicolon);
|
|
59
|
+
if (line.length === 0) continue;
|
|
60
|
+
let genColumn = 0;
|
|
61
|
+
for (let j = 0; j < line.length; j++) {
|
|
62
|
+
const segment = line[j];
|
|
63
|
+
if (j > 0) writer.write(comma);
|
|
64
|
+
genColumn = encodeInteger(writer, segment[0], genColumn);
|
|
65
|
+
if (segment.length === 1) continue;
|
|
66
|
+
sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
|
|
67
|
+
sourceLine = encodeInteger(writer, segment[2], sourceLine);
|
|
68
|
+
sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
|
|
69
|
+
if (segment.length === 4) continue;
|
|
70
|
+
namesIndex = encodeInteger(writer, segment[4], namesIndex);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return writer.flush();
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
//#endregion
|
|
77
|
+
export { encode };
|
|
78
|
+
//# sourceMappingURL=sourcemap-codec.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sourcemap-codec.mjs","names":[],"sources":["../../../../../../../../../../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs"],"sourcesContent":["// src/vlq.ts\nvar comma = \",\".charCodeAt(0);\nvar semicolon = \";\".charCodeAt(0);\nvar chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\nvar intToChar = new Uint8Array(64);\nvar charToInt = new Uint8Array(128);\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\nfunction decodeInteger(reader, relative) {\n let value = 0;\n let shift = 0;\n let integer = 0;\n do {\n const c = reader.next();\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n const shouldNegate = value & 1;\n value >>>= 1;\n if (shouldNegate) {\n value = -2147483648 | -value;\n }\n return relative + value;\n}\nfunction encodeInteger(builder, num, relative) {\n let delta = num - relative;\n delta = delta < 0 ? -delta << 1 | 1 : delta << 1;\n do {\n let clamped = delta & 31;\n delta >>>= 5;\n if (delta > 0) clamped |= 32;\n builder.write(intToChar[clamped]);\n } while (delta > 0);\n return num;\n}\nfunction hasMoreVlq(reader, max) {\n if (reader.pos >= max) return false;\n return reader.peek() !== comma;\n}\n\n// src/strings.ts\nvar bufLength = 1024 * 16;\nvar td = typeof TextDecoder !== \"undefined\" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== \"undefined\" ? {\n decode(buf) {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n }\n} : {\n decode(buf) {\n let out = \"\";\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n }\n};\nvar StringWriter = class {\n constructor() {\n this.pos = 0;\n this.out = \"\";\n this.buffer = new Uint8Array(bufLength);\n }\n write(v) {\n const { buffer } = this;\n buffer[this.pos++] = v;\n if (this.pos === bufLength) {\n this.out += td.decode(buffer);\n this.pos = 0;\n }\n }\n flush() {\n const { buffer, out, pos } = this;\n return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;\n }\n};\nvar StringReader = class {\n constructor(buffer) {\n this.pos = 0;\n this.buffer = buffer;\n }\n next() {\n return this.buffer.charCodeAt(this.pos++);\n }\n peek() {\n return this.buffer.charCodeAt(this.pos);\n }\n indexOf(char) {\n const { buffer, pos } = this;\n const idx = buffer.indexOf(char, pos);\n return idx === -1 ? buffer.length : idx;\n }\n};\n\n// src/scopes.ts\nvar EMPTY = [];\nfunction decodeOriginalScopes(input) {\n const { length } = input;\n const reader = new StringReader(input);\n const scopes = [];\n const stack = [];\n let line = 0;\n for (; reader.pos < length; reader.pos++) {\n line = decodeInteger(reader, line);\n const column = decodeInteger(reader, 0);\n if (!hasMoreVlq(reader, length)) {\n const last = stack.pop();\n last[2] = line;\n last[3] = column;\n continue;\n }\n const kind = decodeInteger(reader, 0);\n const fields = decodeInteger(reader, 0);\n const hasName = fields & 1;\n const scope = hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind];\n let vars = EMPTY;\n if (hasMoreVlq(reader, length)) {\n vars = [];\n do {\n const varsIndex = decodeInteger(reader, 0);\n vars.push(varsIndex);\n } while (hasMoreVlq(reader, length));\n }\n scope.vars = vars;\n scopes.push(scope);\n stack.push(scope);\n }\n return scopes;\n}\nfunction encodeOriginalScopes(scopes) {\n const writer = new StringWriter();\n for (let i = 0; i < scopes.length; ) {\n i = _encodeOriginalScopes(scopes, i, writer, [0]);\n }\n return writer.flush();\n}\nfunction _encodeOriginalScopes(scopes, index, writer, state) {\n const scope = scopes[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;\n if (index > 0) writer.write(comma);\n state[0] = encodeInteger(writer, startLine, state[0]);\n encodeInteger(writer, startColumn, 0);\n encodeInteger(writer, kind, 0);\n const fields = scope.length === 6 ? 1 : 0;\n encodeInteger(writer, fields, 0);\n if (scope.length === 6) encodeInteger(writer, scope[5], 0);\n for (const v of vars) {\n encodeInteger(writer, v, 0);\n }\n for (index++; index < scopes.length; ) {\n const next = scopes[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || l === endLine && c >= endColumn) {\n break;\n }\n index = _encodeOriginalScopes(scopes, index, writer, state);\n }\n writer.write(comma);\n state[0] = encodeInteger(writer, endLine, state[0]);\n encodeInteger(writer, endColumn, 0);\n return index;\n}\nfunction decodeGeneratedRanges(input) {\n const { length } = input;\n const reader = new StringReader(input);\n const ranges = [];\n const stack = [];\n let genLine = 0;\n let definitionSourcesIndex = 0;\n let definitionScopeIndex = 0;\n let callsiteSourcesIndex = 0;\n let callsiteLine = 0;\n let callsiteColumn = 0;\n let bindingLine = 0;\n let bindingColumn = 0;\n do {\n const semi = reader.indexOf(\";\");\n let genColumn = 0;\n for (; reader.pos < semi; reader.pos++) {\n genColumn = decodeInteger(reader, genColumn);\n if (!hasMoreVlq(reader, semi)) {\n const last = stack.pop();\n last[2] = genLine;\n last[3] = genColumn;\n continue;\n }\n const fields = decodeInteger(reader, 0);\n const hasDefinition = fields & 1;\n const hasCallsite = fields & 2;\n const hasScope = fields & 4;\n let callsite = null;\n let bindings = EMPTY;\n let range;\n if (hasDefinition) {\n const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);\n definitionScopeIndex = decodeInteger(\n reader,\n definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0\n );\n definitionSourcesIndex = defSourcesIndex;\n range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex];\n } else {\n range = [genLine, genColumn, 0, 0];\n }\n range.isScope = !!hasScope;\n if (hasCallsite) {\n const prevCsi = callsiteSourcesIndex;\n const prevLine = callsiteLine;\n callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);\n const sameSource = prevCsi === callsiteSourcesIndex;\n callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);\n callsiteColumn = decodeInteger(\n reader,\n sameSource && prevLine === callsiteLine ? callsiteColumn : 0\n );\n callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];\n }\n range.callsite = callsite;\n if (hasMoreVlq(reader, semi)) {\n bindings = [];\n do {\n bindingLine = genLine;\n bindingColumn = genColumn;\n const expressionsCount = decodeInteger(reader, 0);\n let expressionRanges;\n if (expressionsCount < -1) {\n expressionRanges = [[decodeInteger(reader, 0)]];\n for (let i = -1; i > expressionsCount; i--) {\n const prevBl = bindingLine;\n bindingLine = decodeInteger(reader, bindingLine);\n bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);\n const expression = decodeInteger(reader, 0);\n expressionRanges.push([expression, bindingLine, bindingColumn]);\n }\n } else {\n expressionRanges = [[expressionsCount]];\n }\n bindings.push(expressionRanges);\n } while (hasMoreVlq(reader, semi));\n }\n range.bindings = bindings;\n ranges.push(range);\n stack.push(range);\n }\n genLine++;\n reader.pos = semi + 1;\n } while (reader.pos < length);\n return ranges;\n}\nfunction encodeGeneratedRanges(ranges) {\n if (ranges.length === 0) return \"\";\n const writer = new StringWriter();\n for (let i = 0; i < ranges.length; ) {\n i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);\n }\n return writer.flush();\n}\nfunction _encodeGeneratedRanges(ranges, index, writer, state) {\n const range = ranges[index];\n const {\n 0: startLine,\n 1: startColumn,\n 2: endLine,\n 3: endColumn,\n isScope,\n callsite,\n bindings\n } = range;\n if (state[0] < startLine) {\n catchupLine(writer, state[0], startLine);\n state[0] = startLine;\n state[1] = 0;\n } else if (index > 0) {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, range[1], state[1]);\n const fields = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0);\n encodeInteger(writer, fields, 0);\n if (range.length === 6) {\n const { 4: sourcesIndex, 5: scopesIndex } = range;\n if (sourcesIndex !== state[2]) {\n state[3] = 0;\n }\n state[2] = encodeInteger(writer, sourcesIndex, state[2]);\n state[3] = encodeInteger(writer, scopesIndex, state[3]);\n }\n if (callsite) {\n const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite;\n if (sourcesIndex !== state[4]) {\n state[5] = 0;\n state[6] = 0;\n } else if (callLine !== state[5]) {\n state[6] = 0;\n }\n state[4] = encodeInteger(writer, sourcesIndex, state[4]);\n state[5] = encodeInteger(writer, callLine, state[5]);\n state[6] = encodeInteger(writer, callColumn, state[6]);\n }\n if (bindings) {\n for (const binding of bindings) {\n if (binding.length > 1) encodeInteger(writer, -binding.length, 0);\n const expression = binding[0][0];\n encodeInteger(writer, expression, 0);\n let bindingStartLine = startLine;\n let bindingStartColumn = startColumn;\n for (let i = 1; i < binding.length; i++) {\n const expRange = binding[i];\n bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine);\n bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn);\n encodeInteger(writer, expRange[0], 0);\n }\n }\n }\n for (index++; index < ranges.length; ) {\n const next = ranges[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || l === endLine && c >= endColumn) {\n break;\n }\n index = _encodeGeneratedRanges(ranges, index, writer, state);\n }\n if (state[0] < endLine) {\n catchupLine(writer, state[0], endLine);\n state[0] = endLine;\n state[1] = 0;\n } else {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, endColumn, state[1]);\n return index;\n}\nfunction catchupLine(writer, lastLine, line) {\n do {\n writer.write(semicolon);\n } while (++lastLine < line);\n}\n\n// src/sourcemap-codec.ts\nfunction decode(mappings) {\n const { length } = mappings;\n const reader = new StringReader(mappings);\n const decoded = [];\n let genColumn = 0;\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n do {\n const semi = reader.indexOf(\";\");\n const line = [];\n let sorted = true;\n let lastCol = 0;\n genColumn = 0;\n while (reader.pos < semi) {\n let seg;\n genColumn = decodeInteger(reader, genColumn);\n if (genColumn < lastCol) sorted = false;\n lastCol = genColumn;\n if (hasMoreVlq(reader, semi)) {\n sourcesIndex = decodeInteger(reader, sourcesIndex);\n sourceLine = decodeInteger(reader, sourceLine);\n sourceColumn = decodeInteger(reader, sourceColumn);\n if (hasMoreVlq(reader, semi)) {\n namesIndex = decodeInteger(reader, namesIndex);\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];\n } else {\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];\n }\n } else {\n seg = [genColumn];\n }\n line.push(seg);\n reader.pos++;\n }\n if (!sorted) sort(line);\n decoded.push(line);\n reader.pos = semi + 1;\n } while (reader.pos <= length);\n return decoded;\n}\nfunction sort(line) {\n line.sort(sortComparator);\n}\nfunction sortComparator(a, b) {\n return a[0] - b[0];\n}\nfunction encode(decoded) {\n const writer = new StringWriter();\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0) writer.write(semicolon);\n if (line.length === 0) continue;\n let genColumn = 0;\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n if (j > 0) writer.write(comma);\n genColumn = encodeInteger(writer, segment[0], genColumn);\n if (segment.length === 1) continue;\n sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);\n sourceLine = encodeInteger(writer, segment[2], sourceLine);\n sourceColumn = encodeInteger(writer, segment[3], sourceColumn);\n if (segment.length === 4) continue;\n namesIndex = encodeInteger(writer, segment[4], namesIndex);\n }\n }\n return writer.flush();\n}\nexport {\n decode,\n decodeGeneratedRanges,\n decodeOriginalScopes,\n encode,\n encodeGeneratedRanges,\n encodeOriginalScopes\n};\n//# sourceMappingURL=sourcemap-codec.mjs.map\n"],"x_google_ignoreList":[0],"mappings":";IACI,QAAQ,IAAI,WAAW,CAAC;AAC5B,IAAI,YAAY,IAAI,WAAW,CAAC;AAChC,IAAI,QAAQ;AACZ,IAAI,YAAY,IAAI,WAAW,EAAE;AACjC,IAAI,YAAY,IAAI,WAAW,GAAG;AAClC,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;CACrC,MAAM,IAAI,MAAM,WAAW,CAAC;CAC5B,UAAU,KAAK;CACf,UAAU,KAAK;AACjB;AAkBA,SAAS,cAAc,SAAS,KAAK,UAAU;CAC7C,IAAI,QAAQ,MAAM;CAClB,QAAQ,QAAQ,IAAI,CAAC,SAAS,IAAI,IAAI,SAAS;CAC/C,GAAG;EACD,IAAI,UAAU,QAAQ;EACtB,WAAW;EACX,IAAI,QAAQ,GAAG,WAAW;EAC1B,QAAQ,MAAM,UAAU,QAAQ;CAClC,SAAS,QAAQ;CACjB,OAAO;AACT;IAOI,YAAY,OAAO;AACvB,IAAI,KAAK,OAAO,gBAAgB,8BAA6B,IAAI,YAAY,IAAI,OAAO,WAAW,cAAc,EAC/G,OAAO,KAAK;CAEV,OADY,OAAO,KAAK,IAAI,QAAQ,IAAI,YAAY,IAAI,UACjD,EAAI,SAAS;AACtB,EACF,IAAI,EACF,OAAO,KAAK;CACV,IAAI,MAAM;CACV,KAAK,IAAI,IAAI,GAAG,IAAI,IAAI,QAAQ,KAC9B,OAAO,OAAO,aAAa,IAAI,EAAE;CAEnC,OAAO;AACT,EACF;AACA,IAAI,eAAe,MAAM;CACvB,cAAc;EACZ,KAAK,MAAM;EACX,KAAK,MAAM;EACX,KAAK,SAAS,IAAI,WAAW,SAAS;CACxC;CACA,MAAM,GAAG;EACP,MAAM,EACN,WACI;EACJ,OAAO,KAAK,SAAK;EACjB,IAAE,KAAK,QAAO,WAAA;GACd,KAAA,OAAA,GAAA,OAAA,MAAA;GACF,KAAA,MAAA;EACA;CACA;CACA,QAAQ;EACR,MAAA,EACD,QACG,KACF,QACM;EACJ,OAAK,MAAQ,IAAC,MAAM,GAAA,OAAA,OAAA,SAAA,GAAA,GAAA,CAAA,IAAA;CACtB;AACF;AA8UA,SAAQ,OAAA,SAAA;CACN,MAAA,SAAA,IAAA,aAAqB;CACrB,IAAA,eAAA;CACD,IAAA,aAAA;CACC,IAAE,eAAiB"}
|