@skuba-lib/api 2.1.2 → 2.2.0-move-cdk-snapshot-normalisation-20260516083104
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/lib/index.cjs +15 -0
- package/lib/index.d.cts +12 -4
- package/lib/index.d.mts +12 -4
- package/lib/index.mjs +10 -1
- package/package.json +1 -1
package/lib/index.cjs
CHANGED
|
@@ -1,14 +1,29 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_error = require("./error-DJ-upcVW.cjs");
|
|
2
3
|
const require_buildkite = require("./buildkite-EYIbmVQ4.cjs");
|
|
3
4
|
const require_git = require("./git-CemmnhZX.cjs");
|
|
4
5
|
const require_github = require("./github-YNn-2h6W.cjs");
|
|
5
6
|
const require_net = require("./net-CBYpNAZ9.cjs");
|
|
7
|
+
//#region cdk/index.ts
|
|
8
|
+
var cdk_exports = /* @__PURE__ */ require_error.__exportAll({
|
|
9
|
+
normaliseTemplate: () => normaliseTemplate,
|
|
10
|
+
normaliseTemplateJson: () => normaliseTemplateJson
|
|
11
|
+
});
|
|
12
|
+
const normaliseTemplateJson = (json) => json.replace(/"S3Key":"([0-9a-f]+)\.zip"/g, (_, hash) => `"S3Key":"${"x".repeat(hash.length)}.zip"`).replace(/workerCurrentVersion([0-9a-zA-Z]+)"/g, (_, hash) => `workerCurrentVersion${"x".repeat(hash.length)}"`).replaceAll(/"Value":"\d+\.\d+\.\d+-([^"]+)"/g, (_, hash) => `"Value": "x.x.x-${"x".repeat(hash.length)}"`).replaceAll(/"Value":"v\d+\.\d+\.\d+"/g, (_) => "\"Value\": \"vx.x.x\"").replace(/"DD_TAGS":"git.commit.sha:([0-9a-f]+),git.repository_url:([^\"]+)",/g, "").replaceAll(/(layer:Datadog-[^-]+-.+?:)\d+/g, (_, layer) => `${layer}x`);
|
|
13
|
+
const normaliseTemplate = (template) => JSON.parse(normaliseTemplateJson(JSON.stringify(template)));
|
|
14
|
+
//#endregion
|
|
6
15
|
Object.defineProperty(exports, "Buildkite", {
|
|
7
16
|
enumerable: true,
|
|
8
17
|
get: function() {
|
|
9
18
|
return require_buildkite.buildkite_exports;
|
|
10
19
|
}
|
|
11
20
|
});
|
|
21
|
+
Object.defineProperty(exports, "Cdk", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function() {
|
|
24
|
+
return cdk_exports;
|
|
25
|
+
}
|
|
26
|
+
});
|
|
12
27
|
Object.defineProperty(exports, "Git", {
|
|
13
28
|
enumerable: true,
|
|
14
29
|
get: function() {
|
package/lib/index.d.cts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { t as index_d_exports } from "./index-BHREYHx-.cjs";
|
|
2
|
-
import { t as index_d_exports$
|
|
3
|
-
import { t as index_d_exports$
|
|
4
|
-
import { t as index_d_exports$
|
|
5
|
-
|
|
2
|
+
import { t as index_d_exports$2 } from "./index-BGJOKUEn.cjs";
|
|
3
|
+
import { t as index_d_exports$3 } from "./index-CvCXMWrj.cjs";
|
|
4
|
+
import { t as index_d_exports$4 } from "./index-BF1A__qo.cjs";
|
|
5
|
+
|
|
6
|
+
//#region cdk/index.d.ts
|
|
7
|
+
declare namespace index_d_exports$1 {
|
|
8
|
+
export { normaliseTemplate, normaliseTemplateJson };
|
|
9
|
+
}
|
|
10
|
+
declare const normaliseTemplateJson: (json: string) => string;
|
|
11
|
+
declare const normaliseTemplate: (template: object) => unknown;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { index_d_exports as Buildkite, index_d_exports$1 as Cdk, index_d_exports$2 as Git, index_d_exports$3 as GitHub, index_d_exports$4 as Net };
|
package/lib/index.d.mts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { t as index_d_exports } from "./index-B-uDtu2-.mjs";
|
|
2
|
-
import { t as index_d_exports$
|
|
3
|
-
import { t as index_d_exports$
|
|
4
|
-
import { t as index_d_exports$
|
|
5
|
-
|
|
2
|
+
import { t as index_d_exports$2 } from "./index-BLuWPbMv.mjs";
|
|
3
|
+
import { t as index_d_exports$3 } from "./index-9k0uNPiA.mjs";
|
|
4
|
+
import { t as index_d_exports$4 } from "./index-BFKo2N5d.mjs";
|
|
5
|
+
|
|
6
|
+
//#region cdk/index.d.ts
|
|
7
|
+
declare namespace index_d_exports$1 {
|
|
8
|
+
export { normaliseTemplate, normaliseTemplateJson };
|
|
9
|
+
}
|
|
10
|
+
declare const normaliseTemplateJson: (json: string) => string;
|
|
11
|
+
declare const normaliseTemplate: (template: object) => unknown;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { index_d_exports as Buildkite, index_d_exports$1 as Cdk, index_d_exports$2 as Git, index_d_exports$3 as GitHub, index_d_exports$4 as Net };
|
package/lib/index.mjs
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
import { t as __exportAll } from "./chunk-CfYAbeIz.mjs";
|
|
1
2
|
import { t as buildkite_exports } from "./buildkite-D8p6SH33.mjs";
|
|
2
3
|
import { t as git_exports } from "./git-DBepQ7NY.mjs";
|
|
3
4
|
import { t as github_exports } from "./github-CEOIl2xv.mjs";
|
|
4
5
|
import { t as net_exports } from "./net-xHFhmM3Z.mjs";
|
|
5
|
-
|
|
6
|
+
//#region cdk/index.ts
|
|
7
|
+
var cdk_exports = /* @__PURE__ */ __exportAll({
|
|
8
|
+
normaliseTemplate: () => normaliseTemplate,
|
|
9
|
+
normaliseTemplateJson: () => normaliseTemplateJson
|
|
10
|
+
});
|
|
11
|
+
const normaliseTemplateJson = (json) => json.replace(/"S3Key":"([0-9a-f]+)\.zip"/g, (_, hash) => `"S3Key":"${"x".repeat(hash.length)}.zip"`).replace(/workerCurrentVersion([0-9a-zA-Z]+)"/g, (_, hash) => `workerCurrentVersion${"x".repeat(hash.length)}"`).replaceAll(/"Value":"\d+\.\d+\.\d+-([^"]+)"/g, (_, hash) => `"Value": "x.x.x-${"x".repeat(hash.length)}"`).replaceAll(/"Value":"v\d+\.\d+\.\d+"/g, (_) => "\"Value\": \"vx.x.x\"").replace(/"DD_TAGS":"git.commit.sha:([0-9a-f]+),git.repository_url:([^\"]+)",/g, "").replaceAll(/(layer:Datadog-[^-]+-.+?:)\d+/g, (_, layer) => `${layer}x`);
|
|
12
|
+
const normaliseTemplate = (template) => JSON.parse(normaliseTemplateJson(JSON.stringify(template)));
|
|
13
|
+
//#endregion
|
|
14
|
+
export { buildkite_exports as Buildkite, cdk_exports as Cdk, git_exports as Git, github_exports as GitHub, net_exports as Net };
|
package/package.json
CHANGED