@firestartr/cli 2.6.0-snapshot → 2.6.0-snapshot-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.
Files changed (46) hide show
  1. package/README.md +0 -2
  2. package/build/index.js +37271 -44315
  3. package/build/packages/catalog_common/index.d.ts +9 -1
  4. package/build/packages/catalog_common/src/codeowners/index.d.ts +26 -0
  5. package/build/packages/catalog_common/src/types/envvars.d.ts +0 -4
  6. package/build/packages/cdk8s_renderer/src/charts/catalog/tfWorkspaceChart.d.ts +2 -2
  7. package/build/packages/cdk8s_renderer/src/normalizers/refValues.d.ts +6 -10
  8. package/build/packages/cdk8s_renderer/src/normalizers/tfworkspace.d.ts +1 -4
  9. package/build/packages/cdk8s_renderer/src/refsSorter/refsExtractor.d.ts +3 -6
  10. package/build/packages/gh_provisioner/src/entities/ghrepo/helpers/branch_protections.d.ts +7 -0
  11. package/build/packages/gh_provisioner/src/entities/ghrepo/helpers/index.d.ts +1 -0
  12. package/build/packages/gh_provisioner/src/entities/ghrepo/index.d.ts +1 -0
  13. package/build/packages/github/index.d.ts +11 -7
  14. package/build/packages/github/src/auth.d.ts +3 -0
  15. package/build/packages/github/src/auth_installation.d.ts +1 -0
  16. package/build/packages/github/src/branches.d.ts +4 -984
  17. package/build/packages/github/src/config_resolver.d.ts +8 -0
  18. package/build/packages/github/src/encrypt.d.ts +3 -6
  19. package/build/packages/github/src/issues.d.ts +5 -5
  20. package/build/packages/github/src/organization.d.ts +9 -9
  21. package/build/packages/github/src/profile.d.ts +20 -0
  22. package/build/packages/github/src/repository.d.ts +2 -2
  23. package/build/packages/github/src/team.d.ts +6 -129
  24. package/build/packages/github/src/user.d.ts +1 -1
  25. package/build/packages/github/src/with_profile.d.ts +888 -0
  26. package/build/packages/github/src/workflow.d.ts +4 -4
  27. package/build/packages/importer/src/decanter/gh/github_repo.d.ts +2 -0
  28. package/build/packages/operator/src/definitions.d.ts +15 -1
  29. package/build/packages/operator/src/operator-env.d.ts +1 -0
  30. package/build/packages/operator/src/processItem.blocks.d.ts +40 -0
  31. package/build/packages/operator/src/processItem.d.ts +2 -1
  32. package/build/packages/operator/src/processItem.slot.d.ts +5 -2
  33. package/build/packages/operator/src/tfm_mirrors.d.ts +5 -0
  34. package/build/packages/terraform_provisioner/index.d.ts +21 -1
  35. package/build/packages/terraform_provisioner/src/index.d.ts +2 -0
  36. package/build/packages/terraform_provisioner/src/mirror-repos/index.d.ts +41 -0
  37. package/build/packages/terraform_provisioner/src/mirror-repos.d.ts +13 -0
  38. package/build/packages/terraform_provisioner/src/project_tf_remote.d.ts +0 -1
  39. package/build/packages/terraform_provisioner/src/utils.d.ts +19 -1
  40. package/package.json +1 -1
  41. package/build/202.index.js +0 -46
  42. package/build/697.index.js +0 -80
  43. package/build/87.index.js +0 -80
  44. package/build/902.index.js +0 -36
  45. package/build/915.index.js +0 -79
  46. package/build/packages/cdk8s_renderer/src/utils/tfwp-refs.d.ts +0 -13
@@ -22,14 +22,14 @@ export interface WorkflowCompletionResult {
22
22
  * @param ref - Git ref to run on (branch, tag, or SHA)
23
23
  * @param inputs - Workflow input key-value pairs (strings, numbers, or booleans)
24
24
  */
25
- export declare function triggerWorkflow(owner: string, repo: string, workflowId: string | number, ref: string, inputs?: WorkflowDispatchInputs): Promise<void>;
25
+ export declare function triggerWorkflow(owner: string, repo: string, workflowId: string | number, ref: string, inputs?: WorkflowDispatchInputs, octokit?: any): Promise<void>;
26
26
  /**
27
27
  * Get workflow run details
28
28
  * @param owner - GitHub organization
29
29
  * @param repo - Repository name
30
30
  * @param runId - Workflow run ID
31
31
  */
32
- export declare function getWorkflowRun(owner: string, repo: string, runId: number): Promise<WorkflowRunSummary>;
32
+ export declare function getWorkflowRun(owner: string, repo: string, runId: number, octokit?: any): Promise<WorkflowRunSummary>;
33
33
  /**
34
34
  * List recent workflow runs
35
35
  * @param owner - GitHub organization
@@ -38,7 +38,7 @@ export declare function getWorkflowRun(owner: string, repo: string, runId: numbe
38
38
  * @param branch - Optional branch name to filter by
39
39
  * @param status - Optional status to filter by
40
40
  */
41
- export declare function listWorkflowRuns(owner: string, repo: string, workflowId?: string | number, branch?: string, status?: WorkflowRunStatusFilter): Promise<WorkflowRunSummary[]>;
41
+ export declare function listWorkflowRuns(owner: string, repo: string, workflowId?: string | number, branch?: string, status?: WorkflowRunStatusFilter, octokit?: any): Promise<WorkflowRunSummary[]>;
42
42
  /**
43
43
  * Wait for workflow to complete with timeout
44
44
  * Polls on the provided interval. Default timeout is 5 minutes (300000ms).
@@ -48,7 +48,7 @@ export declare function listWorkflowRuns(owner: string, repo: string, workflowId
48
48
  * @param timeoutMs - Maximum time to wait in milliseconds (default: 300000ms / 5 minutes)
49
49
  * @param pollIntervalMs - Polling interval in milliseconds (default: 10000ms / 10 seconds)
50
50
  */
51
- export declare function waitForWorkflowCompletion(owner: string, repo: string, runId: number, timeoutMs?: number, pollIntervalMs?: number): Promise<WorkflowCompletionResult>;
51
+ export declare function waitForWorkflowCompletion(owner: string, repo: string, runId: number, timeoutMs?: number, pollIntervalMs?: number, octokit?: any): Promise<WorkflowCompletionResult>;
52
52
  declare const _default: {
53
53
  triggerWorkflow: typeof triggerWorkflow;
54
54
  getWorkflowRun: typeof getWorkflowRun;
@@ -1,6 +1,8 @@
1
1
  import { BranchStrategiesInitializer, GithubRepositoryOverrider, InitializerDefault } from 'cdk8s_renderer';
2
2
  import { GithubDecanter } from './base';
3
3
  export default class RepoGithubDecanter extends GithubDecanter {
4
+ __gatherIsEmpty(): Promise<void>;
5
+ __decantValidateNotEmpty(): void;
4
6
  githubTeams: any;
5
7
  constructor(data: any, org: string, githubTeams?: any);
6
8
  claimKind: string;
@@ -1,6 +1,20 @@
1
+ import type { Dependencies } from './resolver';
1
2
  export declare function getKindFromPlural(plural: string): any;
2
3
  export declare function getPluralFromKind(kind: string): string;
3
- import type { Dependencies } from './resolver';
4
+ /**
5
+ * Helper to extract the canonical identity (metadata.uid) from a WorkItem or its item.
6
+ *
7
+ * Use this helper when you need a stable identity key for WorkItems, e.g. for
8
+ * in-memory deferred-scheduling bookkeeping.
9
+ *
10
+ * Note: other subsystems may still use kind/namespace/name keys; this helper is
11
+ * specifically intended for UID-based WorkItem identity.
12
+ * Any future change to identity logic MUST be made here and nowhere else.
13
+ *
14
+ * Returns undefined if .metadata.uid is missing so scheduler/bookkeeping paths
15
+ * can safely short-circuit instead of throwing and aborting an entire pass.
16
+ */
17
+ export declare function getWorkItemIdentity(wi: WorkItem): string | undefined;
4
18
  export declare enum OperationType {
5
19
  RENAMED = "RENAMED",
6
20
  UPDATED = "UPDATED",
@@ -0,0 +1 @@
1
+ export declare function getOperatorEnvSnapshot(): Record<string, string>;
@@ -0,0 +1,40 @@
1
+ import type { WorkItem } from './definitions';
2
+ /**
3
+ * Maximum number of blocked attempts allowed before an item is moved to the deferred segment.
4
+ * An item becomes deferred once its blocked-attempt count exceeds this value.
5
+ */
6
+ export declare const MAX_BLOCKED_ATTEMPTS_BEFORE_DEFER = 5;
7
+ export declare const SUPPORTED_PARENT_KINDS: Set<string>;
8
+ /**
9
+ * Encapsulates all deferred-scheduling bookkeeping state for one scheduler queue.
10
+ * Instantiate once per queue (alongside processItemSlotsManager) inside loop().
11
+ */
12
+ export declare class DeferredSchedulingBookkeeper {
13
+ private _blockedAttempts;
14
+ private _deferredEntryOrder;
15
+ private _deferredOrderCounter;
16
+ /**
17
+ * Returns true only for supported parent kinds AND only for deletion operations.
18
+ * Per spec Definition 2: applicable when operation is MARKED_TO_DELETION,
19
+ * or RETRY with metadata.deletionTimestamp set.
20
+ */
21
+ isDeferredSchedulingApplicable(item: WorkItem): boolean;
22
+ /**
23
+ * Increments block counter for item (only call when item has been detected as blocked).
24
+ * Returns new value. Promotes item to deferred segment if threshold crossed.
25
+ */
26
+ incrementBlockedAttempt(item: WorkItem): number;
27
+ getBlockedAttempts(item: WorkItem): number;
28
+ isDeferred(item: WorkItem): boolean;
29
+ getDeferredOrder(item: WorkItem): number | undefined;
30
+ removeBookkeeping(item: WorkItem): void;
31
+ /**
32
+ * Splits queue into non-deferred and deferred, preserving original order,
33
+ * but sorts deferred by stable insertion order.
34
+ */
35
+ partitionQueueByDeferred<T extends WorkItem>(queue: T[]): {
36
+ nonDeferred: T[];
37
+ deferred: T[];
38
+ };
39
+ clearAllBookkeeping(): void;
40
+ }
@@ -1,4 +1,5 @@
1
1
  import { WorkItem } from './informer';
2
+ import { DeferredSchedulingBookkeeper } from './processItem.blocks';
2
3
  export declare function getQueueMetrics(): {
3
4
  nItems: number;
4
5
  nItemsFinished: number;
@@ -25,4 +26,4 @@ export declare function processItem(workItem: WorkItem): Promise<void>;
25
26
  * Periodically checks the queue for finished WorkItems and removes them
26
27
  * @param {WorkItem[]} queue - Queue of WorkItems
27
28
  */
28
- export declare function workItemGarbageCollector(queue: WorkItem[]): Promise<void>;
29
+ export declare function workItemGarbageCollector(queue: WorkItem[], bookkeeper?: DeferredSchedulingBookkeeper): Promise<void>;
@@ -1,11 +1,11 @@
1
1
  import { WorkItem } from './definitions';
2
2
  import { ProcessItemSlotMetrics } from './metrics/processItem.slot.metrics';
3
- export declare function initProcessItemsSlots(nSlots: number, initMetrics?: boolean): ProcessItemSlots;
3
+ export declare function initProcessItemsSlots(nSlots: number, initMetrics?: boolean, onWorkItemBlockedByHandler?: (workItem: WorkItem) => void): ProcessItemSlots;
4
4
  export declare class ProcessItemSlots {
5
5
  _slots: ProcessItemSlot[];
6
6
  _nSlots: number;
7
7
  _guardRails: GuardRails;
8
- constructor(nSlots: number, initMetrics: boolean);
8
+ constructor(nSlots: number, initMetrics: boolean, onWorkItemBlockedByHandler?: (workItem: WorkItem) => void);
9
9
  getIdleSlots(): Generator<ProcessItemSlot, void, unknown>;
10
10
  allSlotsAreIdle(): boolean;
11
11
  isWorkItemBlocked(workItem: WorkItem): boolean;
@@ -24,16 +24,19 @@ export declare class ProcessItemSlot {
24
24
  _actions: {
25
25
  blockItem: (item: any) => void;
26
26
  unblockItem: (item: any) => void;
27
+ onWorkItemBlockedByHandler?: (workItem: WorkItem) => void;
27
28
  } | undefined;
28
29
  _metrics: ProcessItemSlotMetrics;
29
30
  constructor(id: number);
30
31
  set actions(actions: {
31
32
  blockItem: (item: any) => void;
32
33
  unblockItem: (item: any) => void;
34
+ onWorkItemBlockedByHandler?: (workItem: WorkItem) => void;
33
35
  });
34
36
  get actions(): {
35
37
  blockItem: (item: any) => void;
36
38
  unblockItem: (item: any) => void;
39
+ onWorkItemBlockedByHandler?: (workItem: WorkItem) => void;
37
40
  };
38
41
  get idle(): boolean;
39
42
  get id(): number;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Configures TFM Mirrors by reading env configuration and invoking warmupMirrors.
3
+ * Called at operator startup (from index.ts). Fails closed if initial warmup fails.
4
+ */
5
+ export declare function configureTFMMirrors(): Promise<void>;
@@ -1,5 +1,25 @@
1
- export { TFProjectManager } from './src';
1
+ export { TFProjectManager, DEFAULT_MIRROR_WARMUP_LIST, initializeMirrors, } from './src';
2
2
  import type { ProcessHandler } from './src/process_handler';
3
+ export interface WarmupMirrorsRefreshOptions {
4
+ enabled?: boolean;
5
+ runEvery?: number;
6
+ beforeRefresh?: () => Promise<void>;
7
+ onError?: (error: Error) => void | Promise<void>;
8
+ }
9
+ export interface WarmupMirrorsResult {
10
+ success: string[];
11
+ failed: {
12
+ repo: string;
13
+ error: string;
14
+ }[];
15
+ initializeRefresher: (runEvery: number, beforeRefresh?: () => Promise<void>, onError?: (error: Error) => void | Promise<void>) => {
16
+ stop: () => void;
17
+ };
18
+ refresher?: {
19
+ stop: () => void;
20
+ };
21
+ }
22
+ export declare function warmupMirrors(repos?: ReadonlyArray<string>, refreshOptions?: WarmupMirrorsRefreshOptions): Promise<WarmupMirrorsResult>;
3
23
  export declare function validateContext(context: any): void;
4
24
  export declare function run(): Promise<void>;
5
25
  export declare function runTerraformProvisioner(context: any, command?: string, streaming?: any, customArgs?: any, ctl?: ProcessHandler): Promise<any>;
@@ -1,3 +1,5 @@
1
1
  import { TFProjectManager } from './project_tf';
2
2
  export { getRefNameFromKey, resolveRef } from './resolutor';
3
+ export { DEFAULT_MIRROR_WARMUP_LIST, resolveMirroredModuleSource, } from './mirror-repos/index';
4
+ export { initializeMirrors } from './mirror-repos';
3
5
  export { TFProjectManager };
@@ -0,0 +1,41 @@
1
+ export declare const MIRROR_ROOT = "/tmp/tfm_mirrors/";
2
+ /**
3
+ * Returns true if the mirror subsystem is enabled for this process
4
+ */
5
+ export declare function areMirrorsEnabled(): boolean;
6
+ export declare function enableMirrors(): void;
7
+ export declare function getCanonicalRepoId(remoteUrl: string): string;
8
+ export declare function deriveMirrorPath(remoteUrl: string): string;
9
+ export declare function installMirrorForRepo(remoteUrl: string): Promise<string>;
10
+ export declare function translateModuleSource(source: string): string;
11
+ export declare function _getMirrorRegistry(): ReadonlyMap<string, string>;
12
+ export declare function resetMirrorRegistry(): void;
13
+ /**
14
+ * Refresh an existing git mirror by running 'git fetch --prune'.
15
+ * Throws if the mirror is invalid or the fetch fails.
16
+ */
17
+ export declare function refreshMirror(mirrorPath: string): Promise<void>;
18
+ export { initializeMirrors } from '../mirror-repos';
19
+ /**
20
+ * Default repository list to be warmed up (mirrored) by the warmup API.
21
+ * Callers can supply their own repo list to extend or override this default.
22
+ */
23
+ export declare const DEFAULT_MIRROR_WARMUP_LIST: ReadonlyArray<string>;
24
+ /**
25
+ * Warmup function: Installs or updates mirrors for a provided repo list (default: DEFAULT_MIRROR_WARMUP_LIST).
26
+ * Returns a summary of success/failure for each repo.
27
+ */
28
+ export declare function warmupMirrors(repos?: ReadonlyArray<string>): Promise<{
29
+ success: string[];
30
+ failed: {
31
+ repo: string;
32
+ error: string;
33
+ }[];
34
+ }>;
35
+ /**
36
+ * Resolves and installs a mirror for a git-backed Terraform root module source.
37
+ * If translation is possible (eligible git::...), returns a local mirror source,
38
+ * else returns the original source string unchanged.
39
+ * Wraps both detection & mirror install. See spec 002-mirror-tfm-usage.
40
+ */
41
+ export declare function resolveMirroredModuleSource(source: string): Promise<string>;
@@ -0,0 +1,13 @@
1
+ import { warmupMirrors, DEFAULT_MIRROR_WARMUP_LIST, refreshMirror, _getMirrorRegistry, getCanonicalRepoId, installMirrorForRepo, deriveMirrorPath, resetMirrorRegistry, MIRROR_ROOT, resolveMirroredModuleSource, translateModuleSource, enableMirrors, areMirrorsEnabled } from './mirror-repos/index';
2
+ export { warmupMirrors, DEFAULT_MIRROR_WARMUP_LIST, refreshMirror, _getMirrorRegistry, getCanonicalRepoId, installMirrorForRepo, deriveMirrorPath, resetMirrorRegistry, MIRROR_ROOT, resolveMirroredModuleSource, translateModuleSource, enableMirrors, areMirrorsEnabled, };
3
+ interface MirrorSummary {
4
+ success: string[];
5
+ failed: {
6
+ repo: string;
7
+ error: string;
8
+ }[];
9
+ initializeRefresher: (runEvery: number, beforeRefresh?: () => Promise<void>, onError?: (error: Error) => void | Promise<void>) => {
10
+ stop: () => void;
11
+ };
12
+ }
13
+ export declare function initializeMirrors(repos?: ReadonlyArray<string>): Promise<MirrorSummary>;
@@ -24,7 +24,6 @@ export declare class TFProjectManagerRemote {
24
24
  getOutput(): any;
25
25
  setStreamCallbacks(fnData: Function, fnEnd: (...args: any[]) => void, reopen?: boolean): void;
26
26
  build(): Promise<void>;
27
- __configGit(): Promise<void>;
28
27
  __init(): Promise<void>;
29
28
  __initFromModule(): Promise<void>;
30
29
  validate(): Promise<void>;
@@ -10,4 +10,22 @@ export declare function customCommand(path: string, secrets: any[], args: any[],
10
10
  export declare function destroy(path: string, secrets: any[], stream?: PassThrough, ctl?: ProcessHandler): Promise<unknown>;
11
11
  export declare function output(path: string, secrets: any[]): Promise<unknown>;
12
12
  export declare function tfExec(path: string, args: Array<string>, secrets: any[], extraArgs?: string[], stream?: PassThrough, ctl?: ProcessHandler): Promise<unknown>;
13
- export declare function configureGit(ghToken: string): Promise<unknown>;
13
+ /**
14
+ * Clone a remote repository as a git bare mirror.
15
+ */
16
+ export declare function gitCloneMirror(remoteUrl: string, mirrorPath: string): Promise<void>;
17
+ /**
18
+ * Perform a git remote update on an existing mirror repo.
19
+ */
20
+ export declare function gitRemoteUpdate(mirrorPath: string): Promise<void>;
21
+ /**
22
+ * Run 'git fetch --prune' in a bare or mirror repository.
23
+ * Throws if the operation fails.
24
+ */
25
+ export declare function gitFetchPrune(mirrorPath: string): Promise<void>;
26
+ /**
27
+ * Single package-wide GitHub authentication config writer for repo mirrors and remote workflows.
28
+ * Writes the required url rewriting stanza to /home/node/.gitconfig based on the current org's GitHub App token.
29
+ * This is the ONLY allowed implementation of project git-auth per package specs.
30
+ */
31
+ export declare function configGit(): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestartr/cli",
3
- "version": "2.6.0-snapshot",
3
+ "version": "2.6.0-snapshot-1",
4
4
  "private": false,
5
5
  "description": "Commandline tool",
6
6
  "main": "build/main.js",
@@ -1,46 +0,0 @@
1
- export const id = 202;
2
- export const ids = [202];
3
- export const modules = {
4
-
5
- /***/ 66202:
6
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7
-
8
-
9
- Object.defineProperty(exports, "__esModule", ({ value: true }));
10
- exports.getMachineId = void 0;
11
- /*
12
- * Copyright The OpenTelemetry Authors
13
- *
14
- * Licensed under the Apache License, Version 2.0 (the "License");
15
- * you may not use this file except in compliance with the License.
16
- * You may obtain a copy of the License at
17
- *
18
- * https://www.apache.org/licenses/LICENSE-2.0
19
- *
20
- * Unless required by applicable law or agreed to in writing, software
21
- * distributed under the License is distributed on an "AS IS" BASIS,
22
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23
- * See the License for the specific language governing permissions and
24
- * limitations under the License.
25
- */
26
- const fs_1 = __webpack_require__(57147);
27
- const api_1 = __webpack_require__(78199);
28
- async function getMachineId() {
29
- const paths = ['/etc/machine-id', '/var/lib/dbus/machine-id'];
30
- for (const path of paths) {
31
- try {
32
- const result = await fs_1.promises.readFile(path, { encoding: 'utf8' });
33
- return result.trim();
34
- }
35
- catch (e) {
36
- api_1.diag.debug(`error reading machine id: ${e}`);
37
- }
38
- }
39
- return undefined;
40
- }
41
- exports.getMachineId = getMachineId;
42
- //# sourceMappingURL=getMachineId-linux.js.map
43
-
44
- /***/ })
45
-
46
- };
@@ -1,80 +0,0 @@
1
- export const id = 697;
2
- export const ids = [697];
3
- export const modules = {
4
-
5
- /***/ 69192:
6
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7
-
8
-
9
- /*
10
- * Copyright The OpenTelemetry Authors
11
- *
12
- * Licensed under the Apache License, Version 2.0 (the "License");
13
- * you may not use this file except in compliance with the License.
14
- * You may obtain a copy of the License at
15
- *
16
- * https://www.apache.org/licenses/LICENSE-2.0
17
- *
18
- * Unless required by applicable law or agreed to in writing, software
19
- * distributed under the License is distributed on an "AS IS" BASIS,
20
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
- * See the License for the specific language governing permissions and
22
- * limitations under the License.
23
- */
24
- Object.defineProperty(exports, "__esModule", ({ value: true }));
25
- exports.execAsync = void 0;
26
- const child_process = __webpack_require__(32081);
27
- const util = __webpack_require__(73837);
28
- exports.execAsync = util.promisify(child_process.exec);
29
- //# sourceMappingURL=execAsync.js.map
30
-
31
- /***/ }),
32
-
33
- /***/ 30697:
34
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
35
-
36
-
37
- /*
38
- * Copyright The OpenTelemetry Authors
39
- *
40
- * Licensed under the Apache License, Version 2.0 (the "License");
41
- * you may not use this file except in compliance with the License.
42
- * You may obtain a copy of the License at
43
- *
44
- * https://www.apache.org/licenses/LICENSE-2.0
45
- *
46
- * Unless required by applicable law or agreed to in writing, software
47
- * distributed under the License is distributed on an "AS IS" BASIS,
48
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
49
- * See the License for the specific language governing permissions and
50
- * limitations under the License.
51
- */
52
- Object.defineProperty(exports, "__esModule", ({ value: true }));
53
- exports.getMachineId = void 0;
54
- const execAsync_1 = __webpack_require__(69192);
55
- const api_1 = __webpack_require__(78199);
56
- async function getMachineId() {
57
- try {
58
- const result = await (0, execAsync_1.execAsync)('ioreg -rd1 -c "IOPlatformExpertDevice"');
59
- const idLine = result.stdout
60
- .split('\n')
61
- .find(line => line.includes('IOPlatformUUID'));
62
- if (!idLine) {
63
- return undefined;
64
- }
65
- const parts = idLine.split('" = "');
66
- if (parts.length === 2) {
67
- return parts[1].slice(0, -1);
68
- }
69
- }
70
- catch (e) {
71
- api_1.diag.debug(`error reading machine id: ${e}`);
72
- }
73
- return undefined;
74
- }
75
- exports.getMachineId = getMachineId;
76
- //# sourceMappingURL=getMachineId-darwin.js.map
77
-
78
- /***/ })
79
-
80
- };
package/build/87.index.js DELETED
@@ -1,80 +0,0 @@
1
- export const id = 87;
2
- export const ids = [87];
3
- export const modules = {
4
-
5
- /***/ 69192:
6
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7
-
8
-
9
- /*
10
- * Copyright The OpenTelemetry Authors
11
- *
12
- * Licensed under the Apache License, Version 2.0 (the "License");
13
- * you may not use this file except in compliance with the License.
14
- * You may obtain a copy of the License at
15
- *
16
- * https://www.apache.org/licenses/LICENSE-2.0
17
- *
18
- * Unless required by applicable law or agreed to in writing, software
19
- * distributed under the License is distributed on an "AS IS" BASIS,
20
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
- * See the License for the specific language governing permissions and
22
- * limitations under the License.
23
- */
24
- Object.defineProperty(exports, "__esModule", ({ value: true }));
25
- exports.execAsync = void 0;
26
- const child_process = __webpack_require__(32081);
27
- const util = __webpack_require__(73837);
28
- exports.execAsync = util.promisify(child_process.exec);
29
- //# sourceMappingURL=execAsync.js.map
30
-
31
- /***/ }),
32
-
33
- /***/ 55087:
34
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
35
-
36
-
37
- /*
38
- * Copyright The OpenTelemetry Authors
39
- *
40
- * Licensed under the Apache License, Version 2.0 (the "License");
41
- * you may not use this file except in compliance with the License.
42
- * You may obtain a copy of the License at
43
- *
44
- * https://www.apache.org/licenses/LICENSE-2.0
45
- *
46
- * Unless required by applicable law or agreed to in writing, software
47
- * distributed under the License is distributed on an "AS IS" BASIS,
48
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
49
- * See the License for the specific language governing permissions and
50
- * limitations under the License.
51
- */
52
- Object.defineProperty(exports, "__esModule", ({ value: true }));
53
- exports.getMachineId = void 0;
54
- const process = __webpack_require__(77282);
55
- const execAsync_1 = __webpack_require__(69192);
56
- const api_1 = __webpack_require__(78199);
57
- async function getMachineId() {
58
- const args = 'QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid';
59
- let command = '%windir%\\System32\\REG.exe';
60
- if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) {
61
- command = '%windir%\\sysnative\\cmd.exe /c ' + command;
62
- }
63
- try {
64
- const result = await (0, execAsync_1.execAsync)(`${command} ${args}`);
65
- const parts = result.stdout.split('REG_SZ');
66
- if (parts.length === 2) {
67
- return parts[1].trim();
68
- }
69
- }
70
- catch (e) {
71
- api_1.diag.debug(`error reading machine id: ${e}`);
72
- }
73
- return undefined;
74
- }
75
- exports.getMachineId = getMachineId;
76
- //# sourceMappingURL=getMachineId-win.js.map
77
-
78
- /***/ })
79
-
80
- };
@@ -1,36 +0,0 @@
1
- export const id = 902;
2
- export const ids = [902];
3
- export const modules = {
4
-
5
- /***/ 31902:
6
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7
-
8
-
9
- /*
10
- * Copyright The OpenTelemetry Authors
11
- *
12
- * Licensed under the Apache License, Version 2.0 (the "License");
13
- * you may not use this file except in compliance with the License.
14
- * You may obtain a copy of the License at
15
- *
16
- * https://www.apache.org/licenses/LICENSE-2.0
17
- *
18
- * Unless required by applicable law or agreed to in writing, software
19
- * distributed under the License is distributed on an "AS IS" BASIS,
20
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
- * See the License for the specific language governing permissions and
22
- * limitations under the License.
23
- */
24
- Object.defineProperty(exports, "__esModule", ({ value: true }));
25
- exports.getMachineId = void 0;
26
- const api_1 = __webpack_require__(78199);
27
- async function getMachineId() {
28
- api_1.diag.debug('could not read machine-id: unsupported platform');
29
- return undefined;
30
- }
31
- exports.getMachineId = getMachineId;
32
- //# sourceMappingURL=getMachineId-unsupported.js.map
33
-
34
- /***/ })
35
-
36
- };
@@ -1,79 +0,0 @@
1
- export const id = 915;
2
- export const ids = [915];
3
- export const modules = {
4
-
5
- /***/ 69192:
6
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7
-
8
-
9
- /*
10
- * Copyright The OpenTelemetry Authors
11
- *
12
- * Licensed under the Apache License, Version 2.0 (the "License");
13
- * you may not use this file except in compliance with the License.
14
- * You may obtain a copy of the License at
15
- *
16
- * https://www.apache.org/licenses/LICENSE-2.0
17
- *
18
- * Unless required by applicable law or agreed to in writing, software
19
- * distributed under the License is distributed on an "AS IS" BASIS,
20
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
- * See the License for the specific language governing permissions and
22
- * limitations under the License.
23
- */
24
- Object.defineProperty(exports, "__esModule", ({ value: true }));
25
- exports.execAsync = void 0;
26
- const child_process = __webpack_require__(32081);
27
- const util = __webpack_require__(73837);
28
- exports.execAsync = util.promisify(child_process.exec);
29
- //# sourceMappingURL=execAsync.js.map
30
-
31
- /***/ }),
32
-
33
- /***/ 36915:
34
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
35
-
36
-
37
- /*
38
- * Copyright The OpenTelemetry Authors
39
- *
40
- * Licensed under the Apache License, Version 2.0 (the "License");
41
- * you may not use this file except in compliance with the License.
42
- * You may obtain a copy of the License at
43
- *
44
- * https://www.apache.org/licenses/LICENSE-2.0
45
- *
46
- * Unless required by applicable law or agreed to in writing, software
47
- * distributed under the License is distributed on an "AS IS" BASIS,
48
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
49
- * See the License for the specific language governing permissions and
50
- * limitations under the License.
51
- */
52
- Object.defineProperty(exports, "__esModule", ({ value: true }));
53
- exports.getMachineId = void 0;
54
- const fs_1 = __webpack_require__(57147);
55
- const execAsync_1 = __webpack_require__(69192);
56
- const api_1 = __webpack_require__(78199);
57
- async function getMachineId() {
58
- try {
59
- const result = await fs_1.promises.readFile('/etc/hostid', { encoding: 'utf8' });
60
- return result.trim();
61
- }
62
- catch (e) {
63
- api_1.diag.debug(`error reading machine id: ${e}`);
64
- }
65
- try {
66
- const result = await (0, execAsync_1.execAsync)('kenv -q smbios.system.uuid');
67
- return result.stdout.trim();
68
- }
69
- catch (e) {
70
- api_1.diag.debug(`error reading machine id: ${e}`);
71
- }
72
- return undefined;
73
- }
74
- exports.getMachineId = getMachineId;
75
- //# sourceMappingURL=getMachineId-bsd.js.map
76
-
77
- /***/ })
78
-
79
- };
@@ -1,13 +0,0 @@
1
- export type TfwpRefInterpolationContext = {
2
- claim: any;
3
- path: Array<string | number>;
4
- raw: string;
5
- match: string;
6
- kind: string;
7
- name: string;
8
- namespace?: string;
9
- resolvedNamespace: string;
10
- target: string;
11
- };
12
- export type TfwpRefInterpolator = (match: string, context: TfwpRefInterpolationContext) => string | Promise<string>;
13
- export declare function walkTfwpRefs<T>(input: T, claim: any, interpolate: TfwpRefInterpolator, path?: Array<string | number>): Promise<T>;