@hot-updater/supabase 1.0.0-rc.2 → 1.0.0-rc.21
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/dist/edge.cjs +4 -3
- package/dist/edge.d.cts +4 -4
- package/dist/edge.d.mts +4 -4
- package/dist/edge.mjs +2 -2
- package/dist/index.cjs +143 -3
- package/dist/index.d.cts +13 -4
- package/dist/index.d.mts +13 -4
- package/dist/index.mjs +141 -2
- package/dist/init/index.cjs +7593 -4
- package/dist/init/index.d.cts +97 -4
- package/dist/init/index.d.mts +97 -4
- package/dist/init/index.mjs +7578 -1
- package/dist/plugins-B8grmU79.mjs +209 -0
- package/dist/plugins-DJUmZYvT.cjs +238 -0
- package/dist/supabaseDatabase-DVb3-y2x.d.cts +726 -0
- package/dist/supabaseDatabase-DVb3-y2x.d.mts +726 -0
- package/package.json +9 -14
- package/supabase/edge-functions/index.ts +6 -2
- package/supabase/migrations/20260818000000_hot-updater_1.0.0.sql +190 -604
- package/dist/iac/index.cjs +0 -8096
- package/dist/iac/index.d.cts +0 -102
- package/dist/iac/index.d.mts +0 -102
- package/dist/iac/index.mjs +0 -8079
- package/dist/supabaseDatabase-3d90EtUD.d.cts +0 -11
- package/dist/supabaseDatabase-3d90EtUD.d.mts +0 -11
- package/dist/supabaseStorage-CbzHzqCa.cjs +0 -622
- package/dist/supabaseStorage-CjteZ2zX.mjs +0 -611
- package/supabase/edge-functions/runtime.docker.integration.spec.ts +0 -1183
- package/supabase/migrations.spec.ts +0 -281
package/dist/iac/index.d.cts
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { RunInitOptions } from "@hot-updater/cli-tools";
|
|
2
|
-
//#region iac/supabaseApi.d.ts
|
|
3
|
-
type SupabaseInfrastructureState = "fresh" | "incompatible" | "v1";
|
|
4
|
-
interface SupabaseApi {
|
|
5
|
-
getInfrastructureState: () => Promise<SupabaseInfrastructureState>;
|
|
6
|
-
listBuckets: () => Promise<{
|
|
7
|
-
id: string;
|
|
8
|
-
name: string;
|
|
9
|
-
isPublic: boolean;
|
|
10
|
-
createdAt: string;
|
|
11
|
-
}[]>;
|
|
12
|
-
createBucket: (bucketName: string, options: {
|
|
13
|
-
public: boolean;
|
|
14
|
-
}) => Promise<{
|
|
15
|
-
name: string;
|
|
16
|
-
}>;
|
|
17
|
-
}
|
|
18
|
-
//#endregion
|
|
19
|
-
//#region iac/init/index.d.ts
|
|
20
|
-
declare const SUPABASE_REGION_VALUES: readonly ["ap-east-1", "ap-northeast-1", "ap-northeast-2", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "eu-central-1", "eu-central-2", "eu-north-1", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1", "us-east-1", "us-east-2", "us-west-1", "us-west-2"];
|
|
21
|
-
type SupabaseRegion = (typeof SUPABASE_REGION_VALUES)[number];
|
|
22
|
-
//#endregion
|
|
23
|
-
//#region iac/supabaseManagementApi.d.ts
|
|
24
|
-
type SupabaseOrganization = {
|
|
25
|
-
readonly id: string;
|
|
26
|
-
readonly name: string;
|
|
27
|
-
readonly slug: string;
|
|
28
|
-
};
|
|
29
|
-
type SupabaseProject = {
|
|
30
|
-
readonly id: string;
|
|
31
|
-
readonly name: string;
|
|
32
|
-
readonly region: string;
|
|
33
|
-
};
|
|
34
|
-
interface SupabaseManagementApi {
|
|
35
|
-
createProject: (input: {
|
|
36
|
-
readonly databasePassword: string;
|
|
37
|
-
readonly name: string;
|
|
38
|
-
readonly organizationSlug: string;
|
|
39
|
-
readonly region: SupabaseRegion;
|
|
40
|
-
}) => Promise<SupabaseProject>;
|
|
41
|
-
getProjectStatus: (projectId: string) => Promise<string>;
|
|
42
|
-
listFunctions: (projectId: string) => Promise<readonly string[]>;
|
|
43
|
-
listOrganizations: () => Promise<readonly SupabaseOrganization[]>;
|
|
44
|
-
}
|
|
45
|
-
//#endregion
|
|
46
|
-
//#region iac/index.d.ts
|
|
47
|
-
declare const getLegacySupabaseConfigReference: (configText: string) => "HOT_UPDATER_SUPABASE_ANON_KEY" | "supabaseAnonKey" | null;
|
|
48
|
-
declare const getSupabaseReactNativeSource: ({ apiKey, functionName, projectId }: {
|
|
49
|
-
readonly apiKey: string;
|
|
50
|
-
readonly functionName: string;
|
|
51
|
-
readonly projectId: string;
|
|
52
|
-
}) => string;
|
|
53
|
-
declare const reportSupabaseOriginCatalogReady: () => void;
|
|
54
|
-
declare const reportSupabaseApiKey: (apiKey: string) => void;
|
|
55
|
-
declare const resolveEdgeFunctionDenoConfig: (targetDir: string) => Promise<{
|
|
56
|
-
imports: Record<string, string>;
|
|
57
|
-
}>;
|
|
58
|
-
type SupabaseProjectSelection = {
|
|
59
|
-
readonly create: false;
|
|
60
|
-
readonly project: SupabaseProject;
|
|
61
|
-
} | {
|
|
62
|
-
readonly create: true;
|
|
63
|
-
};
|
|
64
|
-
declare const selectProject: (preferredProjectId?: string, nonInteractive?: boolean, accessToken?: string) => Promise<SupabaseProjectSelection>;
|
|
65
|
-
type SupabaseBucketSelection = {
|
|
66
|
-
readonly create: false;
|
|
67
|
-
readonly id: string;
|
|
68
|
-
readonly isPublic: boolean;
|
|
69
|
-
readonly name: string;
|
|
70
|
-
} | {
|
|
71
|
-
readonly create: true;
|
|
72
|
-
readonly name: string;
|
|
73
|
-
};
|
|
74
|
-
declare const selectBucket: (api: SupabaseApi, preferredBucketName?: string, nonInteractive?: boolean) => Promise<SupabaseBucketSelection>;
|
|
75
|
-
declare const createSelectedBucket: (api: SupabaseApi, selection: SupabaseBucketSelection) => Promise<{
|
|
76
|
-
readonly id: string;
|
|
77
|
-
readonly name: string;
|
|
78
|
-
}>;
|
|
79
|
-
declare const waitForSupabaseProjectReady: ({ getProjectStatus, maxAttempts, onLongWait, pollIntervalMs }: {
|
|
80
|
-
readonly getProjectStatus: () => Promise<string>;
|
|
81
|
-
readonly maxAttempts?: number;
|
|
82
|
-
readonly onLongWait: () => void;
|
|
83
|
-
readonly pollIntervalMs?: number;
|
|
84
|
-
}) => Promise<void>;
|
|
85
|
-
declare const waitForSupabaseSchemaReady: ({ getInfrastructureState, maxAttempts, pollIntervalMs }: {
|
|
86
|
-
readonly getInfrastructureState: SupabaseApi["getInfrastructureState"];
|
|
87
|
-
readonly maxAttempts?: number;
|
|
88
|
-
readonly pollIntervalMs?: number;
|
|
89
|
-
}) => Promise<void>;
|
|
90
|
-
declare const getSupabaseProjectAccess: ({ accessToken, managementApi, project, waitForProject }: {
|
|
91
|
-
readonly accessToken?: string;
|
|
92
|
-
readonly managementApi: SupabaseManagementApi;
|
|
93
|
-
readonly project: SupabaseProject;
|
|
94
|
-
readonly waitForProject: boolean;
|
|
95
|
-
}) => Promise<{
|
|
96
|
-
readonly api: SupabaseApi;
|
|
97
|
-
readonly serviceRoleApiKey: string;
|
|
98
|
-
}>;
|
|
99
|
-
declare const withSupabaseCliMetadataCleanup: <Result>(cwd: string, operation: () => Promise<Result>) => Promise<Result>;
|
|
100
|
-
declare const runInit: (options: RunInitOptions) => Promise<void>;
|
|
101
|
-
//#endregion
|
|
102
|
-
export { SupabaseBucketSelection, SupabaseProjectSelection, createSelectedBucket, getLegacySupabaseConfigReference, getSupabaseProjectAccess, getSupabaseReactNativeSource, reportSupabaseApiKey, reportSupabaseOriginCatalogReady, resolveEdgeFunctionDenoConfig, runInit, selectBucket, selectProject, waitForSupabaseProjectReady, waitForSupabaseSchemaReady, withSupabaseCliMetadataCleanup };
|
package/dist/iac/index.d.mts
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { RunInitOptions } from "@hot-updater/cli-tools";
|
|
2
|
-
//#region iac/supabaseApi.d.ts
|
|
3
|
-
type SupabaseInfrastructureState = "fresh" | "incompatible" | "v1";
|
|
4
|
-
interface SupabaseApi {
|
|
5
|
-
getInfrastructureState: () => Promise<SupabaseInfrastructureState>;
|
|
6
|
-
listBuckets: () => Promise<{
|
|
7
|
-
id: string;
|
|
8
|
-
name: string;
|
|
9
|
-
isPublic: boolean;
|
|
10
|
-
createdAt: string;
|
|
11
|
-
}[]>;
|
|
12
|
-
createBucket: (bucketName: string, options: {
|
|
13
|
-
public: boolean;
|
|
14
|
-
}) => Promise<{
|
|
15
|
-
name: string;
|
|
16
|
-
}>;
|
|
17
|
-
}
|
|
18
|
-
//#endregion
|
|
19
|
-
//#region iac/init/index.d.ts
|
|
20
|
-
declare const SUPABASE_REGION_VALUES: readonly ["ap-east-1", "ap-northeast-1", "ap-northeast-2", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "eu-central-1", "eu-central-2", "eu-north-1", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1", "us-east-1", "us-east-2", "us-west-1", "us-west-2"];
|
|
21
|
-
type SupabaseRegion = (typeof SUPABASE_REGION_VALUES)[number];
|
|
22
|
-
//#endregion
|
|
23
|
-
//#region iac/supabaseManagementApi.d.ts
|
|
24
|
-
type SupabaseOrganization = {
|
|
25
|
-
readonly id: string;
|
|
26
|
-
readonly name: string;
|
|
27
|
-
readonly slug: string;
|
|
28
|
-
};
|
|
29
|
-
type SupabaseProject = {
|
|
30
|
-
readonly id: string;
|
|
31
|
-
readonly name: string;
|
|
32
|
-
readonly region: string;
|
|
33
|
-
};
|
|
34
|
-
interface SupabaseManagementApi {
|
|
35
|
-
createProject: (input: {
|
|
36
|
-
readonly databasePassword: string;
|
|
37
|
-
readonly name: string;
|
|
38
|
-
readonly organizationSlug: string;
|
|
39
|
-
readonly region: SupabaseRegion;
|
|
40
|
-
}) => Promise<SupabaseProject>;
|
|
41
|
-
getProjectStatus: (projectId: string) => Promise<string>;
|
|
42
|
-
listFunctions: (projectId: string) => Promise<readonly string[]>;
|
|
43
|
-
listOrganizations: () => Promise<readonly SupabaseOrganization[]>;
|
|
44
|
-
}
|
|
45
|
-
//#endregion
|
|
46
|
-
//#region iac/index.d.ts
|
|
47
|
-
declare const getLegacySupabaseConfigReference: (configText: string) => "HOT_UPDATER_SUPABASE_ANON_KEY" | "supabaseAnonKey" | null;
|
|
48
|
-
declare const getSupabaseReactNativeSource: ({ apiKey, functionName, projectId }: {
|
|
49
|
-
readonly apiKey: string;
|
|
50
|
-
readonly functionName: string;
|
|
51
|
-
readonly projectId: string;
|
|
52
|
-
}) => string;
|
|
53
|
-
declare const reportSupabaseOriginCatalogReady: () => void;
|
|
54
|
-
declare const reportSupabaseApiKey: (apiKey: string) => void;
|
|
55
|
-
declare const resolveEdgeFunctionDenoConfig: (targetDir: string) => Promise<{
|
|
56
|
-
imports: Record<string, string>;
|
|
57
|
-
}>;
|
|
58
|
-
type SupabaseProjectSelection = {
|
|
59
|
-
readonly create: false;
|
|
60
|
-
readonly project: SupabaseProject;
|
|
61
|
-
} | {
|
|
62
|
-
readonly create: true;
|
|
63
|
-
};
|
|
64
|
-
declare const selectProject: (preferredProjectId?: string, nonInteractive?: boolean, accessToken?: string) => Promise<SupabaseProjectSelection>;
|
|
65
|
-
type SupabaseBucketSelection = {
|
|
66
|
-
readonly create: false;
|
|
67
|
-
readonly id: string;
|
|
68
|
-
readonly isPublic: boolean;
|
|
69
|
-
readonly name: string;
|
|
70
|
-
} | {
|
|
71
|
-
readonly create: true;
|
|
72
|
-
readonly name: string;
|
|
73
|
-
};
|
|
74
|
-
declare const selectBucket: (api: SupabaseApi, preferredBucketName?: string, nonInteractive?: boolean) => Promise<SupabaseBucketSelection>;
|
|
75
|
-
declare const createSelectedBucket: (api: SupabaseApi, selection: SupabaseBucketSelection) => Promise<{
|
|
76
|
-
readonly id: string;
|
|
77
|
-
readonly name: string;
|
|
78
|
-
}>;
|
|
79
|
-
declare const waitForSupabaseProjectReady: ({ getProjectStatus, maxAttempts, onLongWait, pollIntervalMs }: {
|
|
80
|
-
readonly getProjectStatus: () => Promise<string>;
|
|
81
|
-
readonly maxAttempts?: number;
|
|
82
|
-
readonly onLongWait: () => void;
|
|
83
|
-
readonly pollIntervalMs?: number;
|
|
84
|
-
}) => Promise<void>;
|
|
85
|
-
declare const waitForSupabaseSchemaReady: ({ getInfrastructureState, maxAttempts, pollIntervalMs }: {
|
|
86
|
-
readonly getInfrastructureState: SupabaseApi["getInfrastructureState"];
|
|
87
|
-
readonly maxAttempts?: number;
|
|
88
|
-
readonly pollIntervalMs?: number;
|
|
89
|
-
}) => Promise<void>;
|
|
90
|
-
declare const getSupabaseProjectAccess: ({ accessToken, managementApi, project, waitForProject }: {
|
|
91
|
-
readonly accessToken?: string;
|
|
92
|
-
readonly managementApi: SupabaseManagementApi;
|
|
93
|
-
readonly project: SupabaseProject;
|
|
94
|
-
readonly waitForProject: boolean;
|
|
95
|
-
}) => Promise<{
|
|
96
|
-
readonly api: SupabaseApi;
|
|
97
|
-
readonly serviceRoleApiKey: string;
|
|
98
|
-
}>;
|
|
99
|
-
declare const withSupabaseCliMetadataCleanup: <Result>(cwd: string, operation: () => Promise<Result>) => Promise<Result>;
|
|
100
|
-
declare const runInit: (options: RunInitOptions) => Promise<void>;
|
|
101
|
-
//#endregion
|
|
102
|
-
export { SupabaseBucketSelection, SupabaseProjectSelection, createSelectedBucket, getLegacySupabaseConfigReference, getSupabaseProjectAccess, getSupabaseReactNativeSource, reportSupabaseApiKey, reportSupabaseOriginCatalogReady, resolveEdgeFunctionDenoConfig, runInit, selectBucket, selectProject, waitForSupabaseProjectReady, waitForSupabaseSchemaReady, withSupabaseCliMetadataCleanup };
|