@shibanet0/datamitsu-config 0.1.1 → 0.1.3
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/datamitsu.config.js +34 -6
- package/datamitsu.config.oci-dockerhub.js +10077 -0
- package/datamitsu.config.oci-ghcr.js +10077 -0
- package/dist/datamitsu-config/oci.d.ts +18 -0
- package/package.json +4 -2
package/datamitsu.config.js
CHANGED
|
@@ -4583,6 +4583,7 @@ const mapOfApps = {
|
|
|
4583
4583
|
allowBuilds: { "playwright-chromium": true },
|
|
4584
4584
|
trustPolicy: { allowDowngrade: ["semver@6.3.1", "undici-types@6.21.0"] }
|
|
4585
4585
|
}) },
|
|
4586
|
+
lazy: true,
|
|
4586
4587
|
links: { "slidev-theme-default": "node_modules/@slidev/theme-default" },
|
|
4587
4588
|
node: {
|
|
4588
4589
|
binPath: "node_modules/.bin/slidev",
|
|
@@ -4663,7 +4664,7 @@ const mapOfApps = {
|
|
|
4663
4664
|
//#endregion
|
|
4664
4665
|
//#region package.json
|
|
4665
4666
|
var name = "@shibanet0/datamitsu-config";
|
|
4666
|
-
var version = "0.1.
|
|
4667
|
+
var version = "0.1.3";
|
|
4667
4668
|
const oxlintConfig = {
|
|
4668
4669
|
$schema: `./node_modules/${name}/oxlint_configuration_schema.json`,
|
|
4669
4670
|
categories: {
|
|
@@ -5687,6 +5688,7 @@ const vscodeSettings = (context) => {
|
|
|
5687
5688
|
".pnp.*",
|
|
5688
5689
|
".pnpm*",
|
|
5689
5690
|
".prettier*",
|
|
5691
|
+
".oxfmt.config.ts",
|
|
5690
5692
|
".pylintrc",
|
|
5691
5693
|
".release-please*.json",
|
|
5692
5694
|
".releaserc*",
|
|
@@ -7763,7 +7765,7 @@ const setup = {
|
|
|
7763
7765
|
scope: "git-root",
|
|
7764
7766
|
tools: ["yamllint"]
|
|
7765
7767
|
},
|
|
7766
|
-
"commitlint.config.
|
|
7768
|
+
"commitlint.config.mjs": {
|
|
7767
7769
|
content: (context) => {
|
|
7768
7770
|
return [
|
|
7769
7771
|
`import { defineConfig } from "${tools.Path.forImport(tools.Path.join(context.datamitsuDir, "commitlint.config.js"))}";`,
|
|
@@ -7792,7 +7794,7 @@ const setup = {
|
|
|
7792
7794
|
],
|
|
7793
7795
|
scope: "git-root"
|
|
7794
7796
|
},
|
|
7795
|
-
"cspell.config.
|
|
7797
|
+
"cspell.config.mjs": {
|
|
7796
7798
|
content: (context) => {
|
|
7797
7799
|
return [
|
|
7798
7800
|
`import { defineConfig } from "${tools.Path.forImport(tools.Path.join(context.datamitsuDir, "cspell.config.js"))}";`,
|
|
@@ -7858,7 +7860,7 @@ const setup = {
|
|
|
7858
7860
|
"taplo.toml"
|
|
7859
7861
|
]
|
|
7860
7862
|
},
|
|
7861
|
-
"eslint.config.
|
|
7863
|
+
"eslint.config.mjs": {
|
|
7862
7864
|
content: (context) => {
|
|
7863
7865
|
if (env().DATAMITSU_DEV_MODE) return `import { join } from "node:path";
|
|
7864
7866
|
|
|
@@ -8162,7 +8164,7 @@ export default config;
|
|
|
8162
8164
|
projectTypes: ["pnpm-package"],
|
|
8163
8165
|
scope: "git-root"
|
|
8164
8166
|
},
|
|
8165
|
-
"prettier.config.
|
|
8167
|
+
"prettier.config.mjs": {
|
|
8166
8168
|
content: (context) => {
|
|
8167
8169
|
return [
|
|
8168
8170
|
`import { defineConfig } from "${tools.Path.forImport(tools.Path.join(context.datamitsuDir, "prettier.config.js"))}";`,
|
|
@@ -8300,6 +8302,31 @@ function buildManagedGitleaksToml() {
|
|
|
8300
8302
|
});
|
|
8301
8303
|
}
|
|
8302
8304
|
//#endregion
|
|
8305
|
+
//#region src/datamitsu-config/oci.ts
|
|
8306
|
+
/**
|
|
8307
|
+
* OCI bundle pin slot.
|
|
8308
|
+
*
|
|
8309
|
+
* The DEFAULT published config never carries a pin: the placeholder below parses to `undefined`, so
|
|
8310
|
+
* no `oci` key is emitted and store seeding stays opt-in. At release time scripts/inject-oci-pin.ts
|
|
8311
|
+
* produces the SEPARATE `datamitsu.config.oci-ghcr.js` variant — a copy of the built default with
|
|
8312
|
+
* the placeholder replaced by the freshly published ghcr.io bundle reference. Consumers enable
|
|
8313
|
+
* seeding by pointing getBeforeConfigs() at that variant (see docs/get-started/oci-bundle.md), and
|
|
8314
|
+
* can override the `oci` key in their own config layer (e.g. to pull through a corporate registry
|
|
8315
|
+
* mirror — the digest stays the same, so verification is unaffected).
|
|
8316
|
+
*
|
|
8317
|
+
* The config baked into the docker images keeps the placeholder too: a bundle must not
|
|
8318
|
+
* self-reference, and containers already carry the full store.
|
|
8319
|
+
*/
|
|
8320
|
+
const OCI_BUNDLE_PIN = "__DATAMITSU_OCI_BUNDLE_PIN__";
|
|
8321
|
+
function parsePin(raw) {
|
|
8322
|
+
try {
|
|
8323
|
+
return JSON.parse(raw);
|
|
8324
|
+
} catch {
|
|
8325
|
+
return;
|
|
8326
|
+
}
|
|
8327
|
+
}
|
|
8328
|
+
const ociBundle = parsePin(OCI_BUNDLE_PIN);
|
|
8329
|
+
//#endregion
|
|
8303
8330
|
//#region src/datamitsu-config/project.ts
|
|
8304
8331
|
const projectTypes = {
|
|
8305
8332
|
"golang-package": {
|
|
@@ -10036,6 +10063,7 @@ function getConfig(cfg) {
|
|
|
10036
10063
|
...mapOfRuntimes?.node ? { node: { ...mapOfRuntimes.node } } : {},
|
|
10037
10064
|
...mapOfRuntimes?.uv ? { uv: { ...mapOfRuntimes.uv } } : {}
|
|
10038
10065
|
},
|
|
10066
|
+
...ociBundle ? { oci: ociBundle } : {},
|
|
10039
10067
|
setup,
|
|
10040
10068
|
sharedStorage: { ...cfg.sharedStorage },
|
|
10041
10069
|
tools: toolsConfig
|
|
@@ -10043,7 +10071,7 @@ function getConfig(cfg) {
|
|
|
10043
10071
|
}
|
|
10044
10072
|
globalThis.getConfig = getConfig;
|
|
10045
10073
|
const getMinVersion = () => {
|
|
10046
|
-
return "0.1.
|
|
10074
|
+
return "0.1.3";
|
|
10047
10075
|
};
|
|
10048
10076
|
globalThis.getMinVersion = getMinVersion;
|
|
10049
10077
|
//#endregion
|