@rizom/ops 0.2.0-alpha.141 → 0.2.0-alpha.142

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.
@@ -4,6 +4,7 @@ export interface CertBootstrapOptions {
4
4
  env?: NodeJS.ProcessEnv | undefined;
5
5
  cfApiToken?: string | undefined;
6
6
  cfZoneId?: string | undefined;
7
+ handle?: string | undefined;
7
8
  fetchImpl?: FetchLike;
8
9
  logger?: (message: string) => void;
9
10
  pushTo?: string | undefined;
@@ -14,6 +15,7 @@ export interface CertBootstrapResult {
14
15
  certificatePath: string;
15
16
  privateKeyPath: string;
16
17
  certificatePem: string;
18
+ secretsSnippetPath: string;
17
19
  }
18
20
  export declare function runPilotCertBootstrap(rootDir: string, options?: CertBootstrapOptions): Promise<{
19
21
  success: boolean;
@@ -0,0 +1,10 @@
1
+ export interface ContentRepoRef {
2
+ org: string;
3
+ name: string;
4
+ }
5
+ /**
6
+ * A user's contentRepo is either a bare repo name (owned by the pilot
7
+ * org) or an org-qualified `org/name` override.
8
+ */
9
+ export declare function resolveContentRepoRef(contentRepo: string, githubOrg: string): ContentRepoRef;
10
+ export declare function renderContentRepoRef(contentRepo: string, githubOrg: string): string;
package/dist/deploy.js CHANGED
@@ -1,4 +1,8 @@
1
1
  // @bun
2
- import{appendFileSync as u,readFileSync as m}from"fs";var y=/^# ---- .+ ----$/;function l(e,n){let t=[],r=new Set,v=n?.skipSections??new Set,p=!1,s=!1,o=!1;for(let S of e.split(/\r?\n/)){let i=S.trim();if(y.test(i)){p=v.has(i),s=!1,o=!1;continue}if(p)continue;if(i.startsWith("#")){if(i.includes("@required"))s=!0;if(i.includes("@sensitive"))o=!0;continue}let c=i.match(/^([A-Z][A-Z0-9_]*)=/);if(!c?.[1]){s=!1,o=!1;continue}let a=c[1];if(!r.has(a))r.add(a),t.push({key:a,required:s,sensitive:o});s=!1,o=!1}return t}function d(e,n){return l(m(e,"utf8"),n)}async function f(e,n){let t=await e.text();if(!t)throw Error(`${n} returned an empty response (${e.status})`);try{return JSON.parse(t)}catch{throw Error(`${n} returned invalid JSON (${e.status}): ${t}`)}}function E(e){let n=m(e,"utf8");return Object.fromEntries(n.split(/\r?\n/).filter(Boolean).map((t)=>{let r=t.indexOf("=");return[t.slice(0,r),t.slice(r+1)]}))}function _(e){let n=process.env[e];if(!n)throw Error(`Missing ${e}`);return n}function h(e,n){let t=process.env.GITHUB_OUTPUT;if(t)u(t,`${e}=${n}
3
- `)}function g(e,n){let t=process.env.GITHUB_ENV;if(t)u(t,`${e}=${n}
4
- `)}export{h as writeGitHubOutput,g as writeGitHubEnv,_ as requireEnv,f as readJsonResponse,d as parseEnvSchemaFile,l as parseEnvSchema,E as parseEnvFile};
2
+ import{appendFileSync as l,readFileSync as m}from"fs";var y=/^# ---- .+ ----$/;function p(e,t){let n=[],i=new Set,S=t?.skipSections??new Set,c=!1,s=!1,o=!1;for(let v of e.split(/\r?\n/)){let r=v.trim();if(y.test(r)){c=S.has(r),s=!1,o=!1;continue}if(c)continue;if(r.startsWith("#")){if(r.includes("@required"))s=!0;if(r.includes("@sensitive"))o=!0;continue}let u=r.match(/^([A-Z][A-Z0-9_]*)=/);if(!u?.[1]){s=!1,o=!1;continue}let a=u[1];if(!i.has(a))i.add(a),n.push({key:a,required:s,sensitive:o});s=!1,o=!1}return n}function d(e,t){return p(m(e,"utf8"),t)}async function f(e,t){let n=await e.text();if(!n)throw Error(`${t} returned an empty response (${e.status})`);try{return JSON.parse(n)}catch{throw Error(`${t} returned invalid JSON (${e.status}): ${n}`)}}function E(e){let t=m(e,"utf8");return Object.fromEntries(t.split(/\r?\n/).filter(Boolean).map((n)=>{let i=n.indexOf("=");return[n.slice(0,i),n.slice(i+1)]}))}function _(e){let t=process.env[e];if(!t)throw Error(`Missing ${e}`);return t}function h(e,t){let n=process.env.GITHUB_OUTPUT;if(n)l(n,`${e}=${t}
3
+ `)}function g(e,t){let n=process.env.GITHUB_ENV;if(!n)return;if(t.includes(`
4
+ `)){let i=`EOF_${e}_${Date.now().toString(36)}`;l(n,`${e}<<${i}
5
+ ${t}
6
+ ${i}
7
+ `);return}l(n,`${e}=${t}
8
+ `)}export{h as writeGitHubOutput,g as writeGitHubEnv,_ as requireEnv,f as readJsonResponse,d as parseEnvSchemaFile,p as parseEnvSchema,E as parseEnvFile};