@dxos/config 0.10.0 → 0.11.0

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.
Files changed (78) hide show
  1. package/dist/lib/chunk-config.mjs +123 -0
  2. package/dist/lib/chunk-config.mjs.map +1 -0
  3. package/dist/lib/chunk-definitions.mjs +97 -0
  4. package/dist/lib/chunk-definitions.mjs.map +1 -0
  5. package/dist/lib/chunk-types.mjs +8 -0
  6. package/dist/lib/chunk-types.mjs.map +1 -0
  7. package/dist/lib/index.mjs +171 -0
  8. package/dist/lib/index.mjs.map +1 -0
  9. package/dist/lib/loaders/browser.mjs +82 -0
  10. package/dist/lib/loaders/browser.mjs.map +1 -0
  11. package/dist/lib/loaders.mjs +66 -0
  12. package/dist/lib/loaders.mjs.map +1 -0
  13. package/dist/lib/plugin/browser.mjs +8 -0
  14. package/dist/lib/plugin/browser.mjs.map +1 -0
  15. package/dist/lib/plugin/esbuild-plugin.mjs +22 -0
  16. package/dist/lib/plugin/esbuild-plugin.mjs.map +1 -0
  17. package/dist/lib/plugin/rollup-plugin.mjs +15 -0
  18. package/dist/lib/plugin/rollup-plugin.mjs.map +1 -0
  19. package/dist/lib/plugin/vite-plugin.mjs +24 -0
  20. package/dist/lib/plugin/vite-plugin.mjs.map +1 -0
  21. package/dist/lib/plugin.mjs +2 -0
  22. package/dist/lib/savers/browser.mjs +33 -0
  23. package/dist/lib/savers/browser.mjs.map +1 -0
  24. package/dist/lib/savers.mjs +6 -0
  25. package/dist/lib/savers.mjs.map +1 -0
  26. package/dist/{lib/node-esm/plugin/index.mjs → plugin/node-esm/chunk-PAYIP2UD.mjs} +49 -9
  27. package/dist/plugin/node-esm/chunk-PAYIP2UD.mjs.map +7 -0
  28. package/dist/plugin/node-esm/esbuild-plugin.mjs +1 -1
  29. package/dist/plugin/node-esm/meta.json +1 -1
  30. package/dist/plugin/node-esm/rollup-plugin.mjs +1 -1
  31. package/dist/plugin/node-esm/vite-plugin.mjs +1 -1
  32. package/dist/types/src/config.d.ts +0 -1
  33. package/dist/types/src/config.d.ts.map +1 -1
  34. package/dist/types/tsconfig.tsbuildinfo +1 -1
  35. package/package.json +21 -28
  36. package/src/config-service.ts +3 -3
  37. package/src/config.ts +0 -4
  38. package/src/edge-services.ts +1 -1
  39. package/src/preset.ts +1 -1
  40. package/dist/lib/browser/chunk-VQRJY4AQ.mjs +0 -11
  41. package/dist/lib/browser/chunk-VQRJY4AQ.mjs.map +0 -7
  42. package/dist/lib/browser/chunk-ZY4D4E3Q.mjs +0 -146
  43. package/dist/lib/browser/chunk-ZY4D4E3Q.mjs.map +0 -7
  44. package/dist/lib/browser/index.mjs +0 -197
  45. package/dist/lib/browser/index.mjs.map +0 -7
  46. package/dist/lib/browser/loaders/browser.mjs +0 -73
  47. package/dist/lib/browser/loaders/browser.mjs.map +0 -7
  48. package/dist/lib/browser/loaders/index.mjs +0 -66
  49. package/dist/lib/browser/loaders/index.mjs.map +0 -7
  50. package/dist/lib/browser/meta.json +0 -1
  51. package/dist/lib/browser/plugin/browser.mjs +0 -8
  52. package/dist/lib/browser/plugin/browser.mjs.map +0 -7
  53. package/dist/lib/browser/plugin/index.mjs +0 -98
  54. package/dist/lib/browser/plugin/index.mjs.map +0 -7
  55. package/dist/lib/browser/savers/browser.mjs +0 -25
  56. package/dist/lib/browser/savers/browser.mjs.map +0 -7
  57. package/dist/lib/browser/savers/index.mjs +0 -7
  58. package/dist/lib/browser/savers/index.mjs.map +0 -7
  59. package/dist/lib/node-esm/chunk-T6NFH3CC.mjs +0 -13
  60. package/dist/lib/node-esm/chunk-T6NFH3CC.mjs.map +0 -7
  61. package/dist/lib/node-esm/chunk-WIJROCKQ.mjs +0 -148
  62. package/dist/lib/node-esm/chunk-WIJROCKQ.mjs.map +0 -7
  63. package/dist/lib/node-esm/index.mjs +0 -198
  64. package/dist/lib/node-esm/index.mjs.map +0 -7
  65. package/dist/lib/node-esm/loaders/browser.mjs +0 -75
  66. package/dist/lib/node-esm/loaders/browser.mjs.map +0 -7
  67. package/dist/lib/node-esm/loaders/index.mjs +0 -67
  68. package/dist/lib/node-esm/loaders/index.mjs.map +0 -7
  69. package/dist/lib/node-esm/meta.json +0 -1
  70. package/dist/lib/node-esm/plugin/browser.mjs +0 -10
  71. package/dist/lib/node-esm/plugin/browser.mjs.map +0 -7
  72. package/dist/lib/node-esm/plugin/index.mjs.map +0 -7
  73. package/dist/lib/node-esm/savers/browser.mjs +0 -27
  74. package/dist/lib/node-esm/savers/browser.mjs.map +0 -7
  75. package/dist/lib/node-esm/savers/index.mjs +0 -9
  76. package/dist/lib/node-esm/savers/index.mjs.map +0 -7
  77. package/dist/plugin/node-esm/chunk-XCZNYAQT.mjs +0 -221
  78. package/dist/plugin/node-esm/chunk-XCZNYAQT.mjs.map +0 -7
@@ -0,0 +1,22 @@
1
+ import { t as definitions } from "../chunk-definitions.mjs";
2
+ //#region src/plugin/esbuild-plugin.ts
3
+ var ConfigPlugin = (options = {}) => {
4
+ return {
5
+ name: "dxos-config",
6
+ setup: ({ initialOptions }) => {
7
+ const esbuildOptions = initialOptions;
8
+ esbuildOptions.define ||= {};
9
+ Object.entries(definitions({
10
+ ...options,
11
+ mode: process.env.NODE_ENV
12
+ })).reduce((define, [key, value]) => {
13
+ define[key] = JSON.stringify(value);
14
+ return define;
15
+ }, esbuildOptions.define);
16
+ }
17
+ };
18
+ };
19
+ //#endregion
20
+ export { ConfigPlugin };
21
+
22
+ //# sourceMappingURL=esbuild-plugin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"esbuild-plugin.mjs","names":[],"sources":["../../../src/plugin/esbuild-plugin.ts"],"sourcesContent":["//\n// Copyright 2021 DXOS.org\n//\n\nimport type { Plugin } from 'esbuild';\n\nimport { definitions } from './definitions';\nimport { type ConfigPluginOpts } from './types';\n\nexport const ConfigPlugin = (options: ConfigPluginOpts = {}): Plugin => {\n return {\n name: 'dxos-config',\n setup: ({ initialOptions }) => {\n const esbuildOptions = initialOptions;\n esbuildOptions.define ||= {};\n\n Object.entries(definitions({ ...options, mode: process.env.NODE_ENV })).reduce((define, [key, value]) => {\n define[key] = JSON.stringify(value);\n return define;\n }, esbuildOptions.define);\n },\n };\n};\n"],"mappings":";;AASA,IAAa,gBAAgB,UAA4B,CAAC,MAAc;CACtE,OAAO;EACL,MAAM;EACN,QAAQ,EAAE,qBAAqB;GAC7B,MAAM,iBAAiB;GACvB,eAAe,WAAW,CAAC;GAE3B,OAAO,QAAQ,YAAY;IAAE,GAAG;IAAS,MAAA,QAAA,IAAA;GAA2B,CAAC,CAAC,CAAC,CAAC,QAAQ,QAAQ,CAAC,KAAK,WAAW;IACvG,OAAO,OAAO,KAAK,UAAU,KAAK;IAClC,OAAO;GACT,GAAG,eAAe,MAAM;EAC1B;CACF;AACF"}
@@ -0,0 +1,15 @@
1
+ import { t as definitions } from "../chunk-definitions.mjs";
2
+ //#region src/plugin/rollup-plugin.ts
3
+ var ConfigPlugin = (options = {}) => {
4
+ return {
5
+ name: "dxos-config",
6
+ banner: Object.entries(definitions({
7
+ ...options,
8
+ mode: process.env.NODE_ENV
9
+ })).map(([key, value]) => `globalThis.${key} = ${JSON.stringify(value)};`).join("\n")
10
+ };
11
+ };
12
+ //#endregion
13
+ export { ConfigPlugin };
14
+
15
+ //# sourceMappingURL=rollup-plugin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rollup-plugin.mjs","names":[],"sources":["../../../src/plugin/rollup-plugin.ts"],"sourcesContent":["//\n// Copyright 2022 DXOS.org\n//\n\nimport { type Plugin } from 'rollup';\n\nimport { definitions } from './definitions';\nimport { type ConfigPluginOpts } from './types';\n\nexport const ConfigPlugin = (options: ConfigPluginOpts = {}): Plugin => {\n const contents = Object.entries(definitions({ ...options, mode: process.env.NODE_ENV }))\n .map(([key, value]) => `globalThis.${key} = ${JSON.stringify(value)};`)\n .join('\\n');\n\n return {\n name: 'dxos-config',\n banner: contents,\n };\n};\n"],"mappings":";;AASA,IAAa,gBAAgB,UAA4B,CAAC,MAAc;CAKtE,OAAO;EACL,MAAM;EACN,QANe,OAAO,QAAQ,YAAY;GAAE,GAAG;GAAS,MAAA,QAAA,IAAA;EAA2B,CAAC,CAAC,CAAA,CACpF,KAAK,CAAC,KAAK,WAAW,cAAc,IAAI,KAAK,KAAK,UAAU,KAAK,EAAE,EAAE,CAAA,CACrE,KAAK,IAIE;CACV;AACF"}
@@ -0,0 +1,24 @@
1
+ import { t as definitions } from "../chunk-definitions.mjs";
2
+ import { resolve } from "@dxos/node-std/path";
3
+ //#region src/plugin/vite-plugin.ts
4
+ var ConfigPlugin = (options = {}) => ({
5
+ name: "dxos-config",
6
+ config: () => {
7
+ const configPath = options.root && resolve(options.root, options.configPath ?? "dx.yml");
8
+ const envPath = options.root && resolve(options.root, options.envPath ?? "dx-env.yml");
9
+ const devPath = options.root && resolve(options.root, options.devPath ?? "dx-local.yml");
10
+ return { define: Object.entries(definitions({
11
+ ...options,
12
+ configPath,
13
+ envPath,
14
+ devPath
15
+ })).reduce((define, [key, value]) => {
16
+ define[key] = JSON.stringify(value);
17
+ return define;
18
+ }, {}) };
19
+ }
20
+ });
21
+ //#endregion
22
+ export { ConfigPlugin };
23
+
24
+ //# sourceMappingURL=vite-plugin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite-plugin.mjs","names":[],"sources":["../../../src/plugin/vite-plugin.ts"],"sourcesContent":["//\n// Copyright 2022 DXOS.org\n//\n\nimport { resolve } from 'node:path';\nimport { type Plugin } from 'vite';\n\nimport { definitions } from './definitions';\nimport { type ConfigPluginOpts } from './types';\n\nexport const ConfigPlugin = (options: ConfigPluginOpts = {}): Plugin => ({\n name: 'dxos-config',\n config: () => {\n // Update paths.\n const configPath = options.root && resolve(options.root, options.configPath ?? 'dx.yml');\n const envPath = options.root && resolve(options.root, options.envPath ?? 'dx-env.yml');\n // TODO(burdon): Change to dx-dev.yml?\n const devPath = options.root && resolve(options.root, options.devPath ?? 'dx-local.yml');\n\n const define = Object.entries(definitions({ ...options, configPath, envPath, devPath })).reduce(\n (define, [key, value]) => {\n define[key] = JSON.stringify(value);\n return define;\n },\n {} as { [key: string]: string },\n );\n\n return { define };\n },\n});\n"],"mappings":";;;AAUA,IAAa,gBAAgB,UAA4B,CAAC,OAAe;CACvE,MAAM;CACN,cAAc;EAEZ,MAAM,aAAa,QAAQ,QAAQ,QAAQ,QAAQ,MAAM,QAAQ,cAAc,QAAQ;EACvF,MAAM,UAAU,QAAQ,QAAQ,QAAQ,QAAQ,MAAM,QAAQ,WAAW,YAAY;EAErF,MAAM,UAAU,QAAQ,QAAQ,QAAQ,QAAQ,MAAM,QAAQ,WAAW,cAAc;EAUvF,OAAO,EAAE,QARM,OAAO,QAAQ,YAAY;GAAE,GAAG;GAAS;GAAY;GAAS;EAAQ,CAAC,CAAC,CAAC,CAAC,QACtF,QAAQ,CAAC,KAAK,WAAW;GACxB,OAAO,OAAO,KAAK,UAAU,KAAK;GAClC,OAAO;EACT,GACA,CAAC,CAGM,EAAO;CAClB;AACF"}
@@ -0,0 +1,2 @@
1
+ import { t as definitions } from "./chunk-definitions.mjs";
2
+ export { definitions };
@@ -0,0 +1,33 @@
1
+ import { log } from "@dxos/log";
2
+ import localforage from "localforage";
3
+ //#region src/savers/browser.ts
4
+ var __dxlog_file = "/__w/dxos/dxos/packages/sdk/config/src/savers/browser.ts";
5
+ var PERFORMING_CONFIG_SAVE = false;
6
+ var SaveConfig = async (config) => {
7
+ if (PERFORMING_CONFIG_SAVE) {
8
+ log.warn("Already performing config save", void 0, {
9
+ "~LogMeta": "~LogMeta",
10
+ F: __dxlog_file,
11
+ L: 16,
12
+ S: void 0
13
+ });
14
+ return;
15
+ }
16
+ PERFORMING_CONFIG_SAVE = true;
17
+ try {
18
+ await localforage.setItem("org.dxos.settings.config", config);
19
+ } catch (err) {
20
+ log.warn("Failed to save config", { err }, {
21
+ "~LogMeta": "~LogMeta",
22
+ F: __dxlog_file,
23
+ L: 24,
24
+ S: void 0
25
+ });
26
+ } finally {
27
+ PERFORMING_CONFIG_SAVE = false;
28
+ }
29
+ };
30
+ //#endregion
31
+ export { SaveConfig };
32
+
33
+ //# sourceMappingURL=browser.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.mjs","names":[],"sources":["../../../src/savers/browser.ts"],"sourcesContent":["//\n// Copyright 2021 DXOS.org\n//\n\n/* THIS FILE WILL BE LOADED BY CONTEXT REPLACEMENT PLUGIN IN BROWSER ENVS. */\n\nimport localforage from 'localforage';\n\nimport { log } from '@dxos/log';\nimport { type Config as ConfigProto } from '@dxos/protocols/proto/dxos/config';\n\nlet PERFORMING_CONFIG_SAVE = false;\n\nexport const SaveConfig = async (config: ConfigProto): Promise<void> => {\n if (PERFORMING_CONFIG_SAVE) {\n log.warn('Already performing config save');\n return;\n }\n PERFORMING_CONFIG_SAVE = true;\n\n try {\n await localforage.setItem('org.dxos.settings.config', config);\n } catch (err) {\n log.warn('Failed to save config', { err });\n } finally {\n PERFORMING_CONFIG_SAVE = false;\n }\n};\n"],"mappings":";;;;AAWA,IAAI,yBAAyB;AAE7B,IAAa,aAAa,OAAO,WAAuC;CACtE,IAAI,wBAAwB;EAC1B,IAAI,KAAK,kCAA+B,KAAA,GAAA;GAAA,YAAA;GAAA,GAAA;GAAA,GAAA;GAAA,GAAA,KAAA;EAAA,CAAC;EACzC;CACF;CACA,yBAAyB;CAEzB,IAAI;EACF,MAAM,YAAY,QAAQ,4BAA4B,MAAM;CAC9D,SAAS,KAAK;EACZ,IAAI,KAAK,yBAAyB,EAAE,IAAI,GAAA;GAAA,YAAA;GAAA,GAAA;GAAA,GAAA;GAAA,GAAA,KAAA;EAAA,CAAC;CAC3C,UAAU;EACR,yBAAyB;CAC3B;AACF"}
@@ -0,0 +1,6 @@
1
+ //#region src/savers/index.ts
2
+ var SaveConfig = async (_) => {};
3
+ //#endregion
4
+ export { SaveConfig };
5
+
6
+ //# sourceMappingURL=savers.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"savers.mjs","names":[],"sources":["../../src/savers/index.ts"],"sourcesContent":["//\n// Copyright 2024 DXOS.org\n//\n\nimport { type Config as ConfigProto } from '@dxos/protocols/proto/dxos/config';\n\nexport const SaveConfig = async (_: ConfigProto) => {};\n"],"mappings":";AAMA,IAAa,aAAa,OAAO,MAAmB,CAAC"}
@@ -1,7 +1,4 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- mapFromKeyValues
4
- } from "../chunk-WIJROCKQ.mjs";
5
2
 
6
3
  // src/plugin/definitions.ts
7
4
  import { execSync } from "node:child_process";
@@ -11,7 +8,49 @@ import pkgUp from "pkg-up";
11
8
  import { parse } from "yaml";
12
9
  import { invariant } from "@dxos/invariant";
13
10
  import { log } from "@dxos/log";
14
- import { setDeep } from "@dxos/util";
11
+ import { setDeep as setDeep2 } from "@dxos/util";
12
+
13
+ // src/config.ts
14
+ import defaultsDeep from "lodash.defaultsdeep";
15
+ import isMatch from "lodash.ismatch";
16
+ import { InvalidConfigError } from "@dxos/protocols";
17
+ import { schema } from "@dxos/protocols/proto";
18
+ import { getDeep, setDeep } from "@dxos/util";
19
+ var configRootType = schema.getCodecForType("dxos.config.Config");
20
+ var mapFromKeyValues = (spec, values) => {
21
+ const config = {};
22
+ for (const [key, { path, type }] of Object.entries(spec)) {
23
+ let value = values[key];
24
+ if (value !== void 0) {
25
+ if (type) {
26
+ switch (type) {
27
+ case "boolean": {
28
+ value = String(value).toLowerCase() === "true" || value === "1";
29
+ break;
30
+ }
31
+ case "number": {
32
+ value = Number(value);
33
+ break;
34
+ }
35
+ case "string": {
36
+ break;
37
+ }
38
+ case "json": {
39
+ value = value ? JSON.parse(value) : null;
40
+ break;
41
+ }
42
+ default: {
43
+ throw new Error(`Invalid type: ${type}`);
44
+ }
45
+ }
46
+ }
47
+ setDeep(config, path.split("."), value);
48
+ }
49
+ }
50
+ return config;
51
+ };
52
+
53
+ // src/plugin/definitions.ts
15
54
  var __dxlog_file = "/__w/dxos/dxos/packages/sdk/config/src/plugin/definitions.ts";
16
55
  var CWD = process.cwd();
17
56
  var definitions = ({ configPath, envPath, devPath, mode = process.env.NODE_ENV, publicUrl = "", env }) => {
@@ -33,7 +72,7 @@ var definitions = ({ configPath, envPath, devPath, mode = process.env.NODE_ENV,
33
72
  if (key === "__CONFIG_DEFAULTS__") {
34
73
  Object.entries(process.env).forEach(([key2, value2]) => {
35
74
  if (key2.startsWith("DX_") || env?.includes(key2)) {
36
- setDeep(content, [
75
+ setDeep2(content, [
37
76
  "runtime",
38
77
  "app",
39
78
  "env",
@@ -48,19 +87,19 @@ var definitions = ({ configPath, envPath, devPath, mode = process.env.NODE_ENV,
48
87
  }).replace("\n", "");
49
88
  const packagePath = pkgUp.sync();
50
89
  const packageJson = packagePath && JSON.parse(readFileSync(packagePath, "utf-8"));
51
- setDeep(content, [
90
+ setDeep2(content, [
52
91
  "runtime",
53
92
  "app",
54
93
  "build",
55
94
  "timestamp"
56
95
  ], timestamp);
57
- setDeep(content, [
96
+ setDeep2(content, [
58
97
  "runtime",
59
98
  "app",
60
99
  "build",
61
100
  "commitHash"
62
101
  ], commitHash);
63
- setDeep(content, [
102
+ setDeep2(content, [
64
103
  "runtime",
65
104
  "app",
66
105
  "build",
@@ -93,7 +132,8 @@ var definitions = ({ configPath, envPath, devPath, mode = process.env.NODE_ENV,
93
132
  }
94
133
  });
95
134
  };
135
+
96
136
  export {
97
137
  definitions
98
138
  };
99
- //# sourceMappingURL=index.mjs.map
139
+ //# sourceMappingURL=chunk-PAYIP2UD.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/plugin/definitions.ts", "../../../src/config.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2022 DXOS.org\n//\n\nimport { execSync } from 'node:child_process';\nimport { readFileSync } from 'node:fs';\nimport { resolve } from 'node:path';\nimport pkgUp from 'pkg-up';\nimport { parse } from 'yaml';\n\nimport { invariant } from '@dxos/invariant';\nimport { log } from '@dxos/log';\nimport { setDeep } from '@dxos/util';\n\nimport { mapFromKeyValues } from '../config';\nimport { type ConfigPluginOpts } from './types';\n\nconst CWD = process.cwd();\n\nexport const definitions = ({\n configPath,\n envPath,\n devPath,\n mode = process.env.NODE_ENV,\n publicUrl = '',\n env,\n}: ConfigPluginOpts) => {\n const KEYS_TO_FILE = {\n __CONFIG_DEFAULTS__: configPath?.length ? configPath : resolve(CWD, 'dx.yml'),\n __CONFIG_ENVS__: envPath?.length ? envPath : resolve(CWD, 'dx-env.yml'),\n } as { [key: string]: string };\n if (mode !== 'production') {\n KEYS_TO_FILE.__CONFIG_LOCAL__ = devPath ?? resolve(CWD, 'dx-local.yml');\n }\n\n return Object.entries(KEYS_TO_FILE).reduce(\n (prev, [key, value]) => {\n invariant(key);\n let content = {};\n try {\n content = parse(readFileSync(value, 'utf-8')) as any;\n\n // Map environment variables to config values.\n if (key === '__CONFIG_ENVS__') {\n content = mapFromKeyValues(content, process.env);\n }\n\n if (key === '__CONFIG_DEFAULTS__') {\n // Load app environment variables into default config.\n Object.entries(process.env).forEach(([key, value]) => {\n if (key.startsWith('DX_') || env?.includes(key)) {\n setDeep(content, ['runtime', 'app', 'env', key], value);\n }\n });\n\n // Set build info automatically if available.\n try {\n const timestamp = new Date().toISOString();\n const commitHash =\n process.env.DX_COMMIT_HASH ??\n execSync('git rev-parse --short HEAD', { encoding: 'utf-8' }).replace('\\n', '');\n const packagePath = pkgUp.sync();\n const packageJson = packagePath && JSON.parse(readFileSync(packagePath, 'utf-8'));\n setDeep(content, ['runtime', 'app', 'build', 'timestamp'], timestamp);\n setDeep(content, ['runtime', 'app', 'build', 'commitHash'], commitHash);\n setDeep(content, ['runtime', 'app', 'build', 'version'], packageJson?.version);\n } catch {}\n }\n } catch (err: any) {\n if (err.message.includes('YAMLException')) {\n log.error(`Failed to parse file ${value}:`, err);\n } else {\n log(`Failed to load file ${value}:`, err);\n }\n\n if (key === '__CONFIG_DEFAULTS__') {\n // Default config is required.\n throw new Error(`Failed to load default config file from ${value}`);\n }\n }\n\n return {\n ...prev,\n [key]: content,\n };\n },\n {\n __CONFIG_DEFAULTS__: {},\n __CONFIG_ENVS__: {},\n __CONFIG_LOCAL__: {},\n __DXOS_CONFIG__: { dynamic: mode === 'production', publicUrl },\n },\n );\n};\n", "//\n// Copyright 2021 DXOS.org\n//\n\nimport defaultsDeep from 'lodash.defaultsdeep';\nimport isMatch from 'lodash.ismatch';\n\nimport { InvalidConfigError } from '@dxos/protocols';\nimport { schema } from '@dxos/protocols/proto';\nimport { type Config as ConfigProto } from '@dxos/protocols/proto/dxos/config';\nimport { getDeep, setDeep } from '@dxos/util';\n\nimport { type ConfigKey, type DeepIndex, type ParseKey } from './types';\n\ntype MappingSpec = Record<string, { path: string; type?: string }>;\nconst configRootType = schema.getCodecForType('dxos.config.Config');\n\n/**\n * Maps the given objects onto a flattened set of (key x values).\n * Expects parsed yaml content of the form:\n *\n * ```\n * ENV_VAR:\n * path: config.selector.path\n * ```\n *\n * @param {object} spec\n * @param {object} values\n * @return {object}\n */\nexport const mapFromKeyValues = (spec: MappingSpec, values: Record<string, any>) => {\n const config = {};\n\n for (const [key, { path, type }] of Object.entries(spec)) {\n let value = values[key];\n if (value !== undefined) {\n if (type) {\n switch (type) {\n case 'boolean': {\n value = String(value).toLowerCase() === 'true' || value === '1';\n break;\n }\n\n case 'number': {\n value = Number(value);\n break;\n }\n\n case 'string': {\n break;\n }\n\n case 'json': {\n value = value ? JSON.parse(value) : null;\n break;\n }\n\n default: {\n throw new Error(`Invalid type: ${type}`);\n }\n }\n }\n\n setDeep(config, path.split('.'), value);\n }\n }\n\n return config;\n};\n\n/**\n * Maps the given flattend set of (key x values) onto a JSON object.\n * @param {object} spec\n * @param {object} values\n */\nexport const mapToKeyValues = (spec: MappingSpec, values: any) => {\n const config: Record<string, any> = {};\n\n for (const [key, { path, type }] of Object.entries(spec)) {\n const value = getDeep(values, path.split('.'));\n if (value !== undefined) {\n switch (type) {\n case 'json':\n config[key] = JSON.stringify(value);\n break;\n default:\n config[key] = value;\n }\n }\n }\n\n return config;\n};\n\n/**\n * Validate config object.\n */\nexport const validateConfig = (config: ConfigProto): ConfigProto => {\n if (!('version' in config)) {\n throw new InvalidConfigError({ message: 'Version not specified' });\n }\n\n if (config?.version !== 1) {\n throw new InvalidConfigError({ message: `Invalid config version: ${config.version}` });\n }\n\n const error = configRootType.protoType.verify(config);\n if (error) {\n throw new InvalidConfigError({ message: String(error) });\n }\n\n return config;\n};\n\n/**\n * Global configuration object.\n * NOTE: Config objects are immutable.\n */\nexport class Config {\n private readonly _config: any;\n\n /**\n * Creates an immutable instance.\n * @constructor\n */\n constructor(config: ConfigProto = {}, ...objects: ConfigProto[]) {\n this._config = validateConfig(defaultsDeep(config, ...objects, { version: 1 }));\n }\n\n /**\n * Returns an immutable config JSON object.\n */\n get values(): ConfigProto {\n return this._config;\n }\n\n /**\n * Returns the given config property.\n *\n * @param key A key in the config object. Can be a nested property with keys separated by dots: 'services.signal.server'.\n * @param defaultValue Default value to return if option is not present in the config.\n * @returns The config value or undefined if the option is not present.\n */\n get<K extends ConfigKey>(\n key: K,\n defaultValue?: DeepIndex<ConfigProto, ParseKey<K>>,\n ): DeepIndex<ConfigProto, ParseKey<K>> | undefined {\n return getDeep(this._config, key.split('.')) ?? defaultValue;\n }\n\n /**\n * Get unique key.\n */\n find<T = any>(path: string, test: object): T | undefined {\n const values = getDeep(this._config, path.split('.'));\n if (!Array.isArray(values)) {\n return;\n }\n\n return values.find((value) => isMatch(value, test));\n }\n\n /**\n * Returns the given config property or throw if it doesn't exist.\n *\n * @param key A key in the config object. Can be a nested property with keys separated by dots: 'services.signal.server'.\n */\n getOrThrow<K extends ConfigKey>(key: K): Exclude<DeepIndex<ConfigProto, ParseKey<K>>, undefined> {\n const value: DeepIndex<ConfigProto, ParseKey<K>> | undefined = getDeep(this._config, key.split('.'));\n if (!value) {\n throw new Error(`Config option not present: ${key}`);\n }\n return value;\n }\n}\n"],
5
+ "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,GAAAA,IAAAA,GAAAA,OAAAA,CAAAA;MACvC,OAAA;AAEIf,YAAAA,uBAAQ,KAAuB,KAAA,KAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,OAAA,CAAA;;UAEjC,QAAM,uBAAW;AAErB,cAAA,IAAA,MAAA,2CAAA,KAAA,EAAA;MAEA;;WAEGA;MACH,GAAA;MAEF,CAAA,GAAA,GAAA;IACEX;;IAEA2B,qBAAmB,CAAA;IACnBC,iBAAiB,CAAA;sBAAWrB,CAAAA;qBAAuBsB;MAAU,SAAA,SAAA;MAC/D;IAEF;;;",
6
+ "names": ["execSync", "readFileSync", "resolve", "pkgUp", "parse", "invariant", "log", "setDeep", "defaultsDeep", "isMatch", "InvalidConfigError", "schema", "getDeep", "setDeep", "configRootType", "getCodecForType", "mapFromKeyValues", "spec", "values", "config", "key", "path", "type", "Object", "entries", "value", "undefined", "String", "toLowerCase", "Number", "JSON", "parse", "Error", "split", "process", "KEYS_TO_FILE", "__CONFIG_DEFAULTS__", "configPath", "length", "resolve", "CWD", "__CONFIG_ENVS__", "envPath", "mode", "entries", "reduce", "prev", "key", "value", "content", "parse", "Object", "forEach", "setDeep", "encoding", "replace", "packagePath", "packageJson", "timestamp", "commitHash", "log", "error", "err", "__CONFIG_LOCAL__", "__DXOS_CONFIG__", "publicUrl"]
7
+ }
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
2
  import {
3
3
  definitions
4
- } from "./chunk-XCZNYAQT.mjs";
4
+ } from "./chunk-PAYIP2UD.mjs";
5
5
 
6
6
  // src/plugin/esbuild-plugin.ts
7
7
  var ConfigPlugin = (options = {}) => {
@@ -1 +1 @@
1
- {"inputs":{"src/config.ts":{"bytes":15941,"imports":[{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"lodash.ismatch","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto","kind":"import-statement","external":true},{"path":"@dxos/tracing","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/plugin/definitions.ts":{"bytes":11702,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"pkg-up","kind":"import-statement","external":true},{"path":"yaml","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/config.ts","kind":"import-statement","original":"../config"}],"format":"esm"},"src/plugin/esbuild-plugin.ts":{"bytes":2485,"imports":[{"path":"src/plugin/definitions.ts","kind":"import-statement","original":"./definitions"}],"format":"esm"},"src/plugin/rollup-plugin.ts":{"bytes":1966,"imports":[{"path":"src/plugin/definitions.ts","kind":"import-statement","original":"./definitions"}],"format":"esm"},"src/plugin/vite-plugin.ts":{"bytes":3579,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"src/plugin/definitions.ts","kind":"import-statement","original":"./definitions"}],"format":"esm"}},"outputs":{"dist/plugin/node-esm/esbuild-plugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1347},"dist/plugin/node-esm/esbuild-plugin.mjs":{"imports":[{"path":"dist/plugin/node-esm/chunk-XCZNYAQT.mjs","kind":"import-statement"}],"exports":["ConfigPlugin"],"entryPoint":"src/plugin/esbuild-plugin.ts","inputs":{"src/plugin/esbuild-plugin.ts":{"bytesInOutput":443}},"bytes":693},"dist/plugin/node-esm/rollup-plugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1103},"dist/plugin/node-esm/rollup-plugin.mjs":{"imports":[{"path":"dist/plugin/node-esm/chunk-XCZNYAQT.mjs","kind":"import-statement"}],"exports":["ConfigPlugin"],"entryPoint":"src/plugin/rollup-plugin.ts","inputs":{"src/plugin/rollup-plugin.ts":{"bytesInOutput":288}},"bytes":536},"dist/plugin/node-esm/vite-plugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1836},"dist/plugin/node-esm/vite-plugin.mjs":{"imports":[{"path":"dist/plugin/node-esm/chunk-XCZNYAQT.mjs","kind":"import-statement"},{"path":"node:path","kind":"import-statement","external":true}],"exports":["ConfigPlugin"],"entryPoint":"src/plugin/vite-plugin.ts","inputs":{"src/plugin/vite-plugin.ts":{"bytesInOutput":674}},"bytes":918},"dist/plugin/node-esm/chunk-XCZNYAQT.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12876},"dist/plugin/node-esm/chunk-XCZNYAQT.mjs":{"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"pkg-up","kind":"import-statement","external":true},{"path":"yaml","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"lodash.ismatch","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto","kind":"import-statement","external":true},{"path":"@dxos/tracing","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["definitions"],"inputs":{"src/plugin/definitions.ts":{"bytesInOutput":3089},"src/config.ts":{"bytesInOutput":3686}},"bytes":7016}}}
1
+ {"inputs":{"src/config.ts":{"bytes":14861,"imports":[{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"lodash.ismatch","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/plugin/definitions.ts":{"bytes":11702,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"pkg-up","kind":"import-statement","external":true},{"path":"yaml","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/config.ts","kind":"import-statement","original":"../config"}],"format":"esm"},"src/plugin/esbuild-plugin.ts":{"bytes":2485,"imports":[{"path":"src/plugin/definitions.ts","kind":"import-statement","original":"./definitions"}],"format":"esm"},"src/plugin/rollup-plugin.ts":{"bytes":1966,"imports":[{"path":"src/plugin/definitions.ts","kind":"import-statement","original":"./definitions"}],"format":"esm"},"src/plugin/vite-plugin.ts":{"bytes":3579,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"src/plugin/definitions.ts","kind":"import-statement","original":"./definitions"}],"format":"esm"}},"outputs":{"dist/plugin/node-esm/esbuild-plugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1347},"dist/plugin/node-esm/esbuild-plugin.mjs":{"imports":[{"path":"dist/plugin/node-esm/chunk-PAYIP2UD.mjs","kind":"import-statement"}],"exports":["ConfigPlugin"],"entryPoint":"src/plugin/esbuild-plugin.ts","inputs":{"src/plugin/esbuild-plugin.ts":{"bytesInOutput":443}},"bytes":693},"dist/plugin/node-esm/rollup-plugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1103},"dist/plugin/node-esm/rollup-plugin.mjs":{"imports":[{"path":"dist/plugin/node-esm/chunk-PAYIP2UD.mjs","kind":"import-statement"}],"exports":["ConfigPlugin"],"entryPoint":"src/plugin/rollup-plugin.ts","inputs":{"src/plugin/rollup-plugin.ts":{"bytesInOutput":288}},"bytes":536},"dist/plugin/node-esm/vite-plugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1836},"dist/plugin/node-esm/vite-plugin.mjs":{"imports":[{"path":"dist/plugin/node-esm/chunk-PAYIP2UD.mjs","kind":"import-statement"},{"path":"node:path","kind":"import-statement","external":true}],"exports":["ConfigPlugin"],"entryPoint":"src/plugin/vite-plugin.ts","inputs":{"src/plugin/vite-plugin.ts":{"bytesInOutput":674}},"bytes":918},"dist/plugin/node-esm/chunk-PAYIP2UD.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":11235},"dist/plugin/node-esm/chunk-PAYIP2UD.mjs":{"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"pkg-up","kind":"import-statement","external":true},{"path":"yaml","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"lodash.ismatch","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["definitions"],"inputs":{"src/plugin/definitions.ts":{"bytesInOutput":3089},"src/config.ts":{"bytesInOutput":1106}},"bytes":4436}}}
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
2
  import {
3
3
  definitions
4
- } from "./chunk-XCZNYAQT.mjs";
4
+ } from "./chunk-PAYIP2UD.mjs";
5
5
 
6
6
  // src/plugin/rollup-plugin.ts
7
7
  var ConfigPlugin = (options = {}) => {
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
2
  import {
3
3
  definitions
4
- } from "./chunk-XCZNYAQT.mjs";
4
+ } from "./chunk-PAYIP2UD.mjs";
5
5
 
6
6
  // src/plugin/vite-plugin.ts
7
7
  import { resolve } from "node:path";
@@ -28,7 +28,6 @@ export declare const mapToKeyValues: (spec: MappingSpec, values: any) => Record<
28
28
  * Validate config object.
29
29
  */
30
30
  export declare const validateConfig: (config: ConfigProto) => ConfigProto;
31
- export declare const ConfigResource: unique symbol;
32
31
  /**
33
32
  * Global configuration object.
34
33
  * NOTE: Config objects are immutable.
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/config.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,MAAM,IAAI,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAI/E,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExE,KAAK,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAGnE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB,SAAU,WAAW,UAAU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,OAsC9E,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,SAAU,WAAW,UAAU,GAAG,wBAiB5D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,WAAY,WAAW,KAAG,WAepD,CAAC;AAEF,eAAO,MAAM,cAAc,eAAqC,CAAC;AAEjE;;;GAGG;AACH,qBACa,MAAM;IACjB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAM;IAE9B;;;OAGG;IACH,YAAY,MAAM,GAAE,WAAgB,EAAE,GAAG,OAAO,EAAE,WAAW,EAAE,EAE9D;IAED;;OAEG;IACH,IAAI,MAAM,IAAI,WAAW,CAExB;IAED;;;;;;OAMG;IACH,GAAG,CAAC,CAAC,SAAS,SAAS,EACrB,GAAG,EAAE,CAAC,EACN,YAAY,CAAC,EAAE,SAAS,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,GACjD,SAAS,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAEjD;IAED;;OAEG;IACH,IAAI,CAAC,CAAC,GAAG,GAAG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