@lunora/codegen 1.0.0-alpha.235 → 1.0.0-alpha.236
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/index.d.mts +34 -6
- package/dist/index.d.ts +34 -6
- package/dist/index.mjs +1 -1
- package/dist/packem_shared/{describeErrorLevelFindings-D23VSkFP.mjs → describeErrorLevelFindings-vzaGS9KL.mjs} +1 -1
- package/dist/packem_shared/fingerprintSchemaSources-L3nGKDQt.mjs +1 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2761,16 +2761,16 @@ interface CodegenResult {
|
|
|
2761
2761
|
*/
|
|
2762
2762
|
writtenFiles: ReadonlyArray<string>;
|
|
2763
2763
|
}
|
|
2764
|
+
declare const sortedUniqueNames: (names: Iterable<string>) => ReadonlyArray<string>;
|
|
2764
2765
|
/** Deduplicated, sorted names of every ERROR-level advisory in `advisories`. */
|
|
2765
2766
|
declare const errorAdvisoryNames: (advisories: ReadonlyArray<Pick<Finding, "level" | "name">>) => ReadonlyArray<string>;
|
|
2766
2767
|
/** Deduplicated, sorted names of every error-level platform diagnostic in `platformDiagnostics`. */
|
|
2767
2768
|
declare const errorPlatformDiagnosticNames: (platformDiagnostics: ReadonlyArray<Pick<PlatformDiagnostic, "level" | "name">>) => ReadonlyArray<string>;
|
|
2768
2769
|
/**
|
|
2769
|
-
* Convenience read combining both categories from a full {@link CodegenResult}
|
|
2770
|
-
*
|
|
2771
|
-
*
|
|
2772
|
-
*
|
|
2773
|
-
* opt-out.
|
|
2770
|
+
* Convenience read combining both categories from a full {@link CodegenResult} —
|
|
2771
|
+
* the shape the bundler plugins need, which (unlike the CLI's `lunora
|
|
2772
|
+
* codegen`/`lunora deploy`) folds ERROR-level advisories and platform
|
|
2773
|
+
* diagnostics into a single blocking message with no strict/CI opt-out.
|
|
2774
2774
|
*/
|
|
2775
2775
|
declare const describeErrorLevelFindings: (result: Pick<CodegenResult, "advisories" | "platformDiagnostics">) => {
|
|
2776
2776
|
advisoryNames: ReadonlyArray<string>;
|
|
@@ -3786,6 +3786,34 @@ declare const evaluateSchemaDrift: (options: {
|
|
|
3786
3786
|
/** This run's declared migrations, so a new one is matched to the table it iterates. */
|
|
3787
3787
|
migrations: ReadonlyArray<Pick<MigrationIR, "id" | "table">>;
|
|
3788
3788
|
}) => SchemaDriftDecision;
|
|
3789
|
+
/**
|
|
3790
|
+
* Content hash of the schema directory's TypeScript sources — everything codegen
|
|
3791
|
+
* reads, minus its own `_generated/` output.
|
|
3792
|
+
*
|
|
3793
|
+
* Taken before codegen runs and compared against the previous run's, this is what
|
|
3794
|
+
* tells a developer's save apart from a write the `postcodegen` hook made itself.
|
|
3795
|
+
* Timing cannot: both look identical to a watcher, which is why every save during
|
|
3796
|
+
* a multi-second hook used to be dropped outright. Content can — a formatter that
|
|
3797
|
+
* rewrites a file to the same bytes leaves the hash alone, and a real edit does not.
|
|
3798
|
+
*
|
|
3799
|
+
* Crucially the set EXCLUDES `_generated/`, so a hook that rewrites generated
|
|
3800
|
+
* output (a formatter, a codemod) does not read as a source change. That is what
|
|
3801
|
+
* lets a bundler plugin watch the whole schema directory — the only way a newly
|
|
3802
|
+
* created `lunora/foo.ts` is ever noticed — without the hook's own writes
|
|
3803
|
+
* retriggering it forever.
|
|
3804
|
+
*
|
|
3805
|
+
* The file set comes from codegen's own `listLunoraSourceFiles` (plus
|
|
3806
|
+
* `schema.ts`, which discovery loads separately), so "what codegen reads" is one
|
|
3807
|
+
* decision rather than two that drift: a `readdirSync` walk of its own silently
|
|
3808
|
+
* disagreed about symlinked sources, which is exactly the case where a
|
|
3809
|
+
* regeneration must not be judged a no-op.
|
|
3810
|
+
*
|
|
3811
|
+
* Cheap by construction (a schema directory is a handful of files, read once per
|
|
3812
|
+
* regeneration, not per watcher event). An unreadable directory hashes to a
|
|
3813
|
+
* constant so a transient read error reads as "no change" rather than as an
|
|
3814
|
+
* edit — degrading toward doing nothing, never toward a spurious rerun.
|
|
3815
|
+
*/
|
|
3816
|
+
declare const fingerprintSchemaSources: (schemaDirectory: string) => string;
|
|
3789
3817
|
/**
|
|
3790
3818
|
* Convert a {@link SchemaIR} into a synthetic runtime {@link Schema} carrying just
|
|
3791
3819
|
* the `tables[name].shape` surface `@lunora/seed` introspects. System columns
|
|
@@ -4101,4 +4129,4 @@ declare const secretKindOf: (value: string) => string | undefined;
|
|
|
4101
4129
|
/** A redacted preview of a secret value — first 4 chars plus its length, never the full value. */
|
|
4102
4130
|
declare const redact: (value: string) => string;
|
|
4103
4131
|
declare const VERSION = "0.0.0";
|
|
4104
|
-
export { AGENTS_FILENAME, type AgentIR, type AuthApiCallIR, CONTAINERS_FILENAME, CodegenDiagnosticError, type CodegenOptions, type CodegenResult, type ContainerIR, type ContextPropertyCallIR, type CronJobIR, DEFAULT_TARGET, type DriftChange, type DriftRemediation, type DriftScope, type EmitAppOptions, FLAGS_FILENAME, type FieldSnapshot, type FlagsIR, type FunctionIR, GENERATED_HEADER, type HttpRouteIR, type IndexIR, type IndexSnapshot, type InsertWriteIR, LUNORA_ERROR_CODES, type LintSchemaOptions, type LoadedProjectConfig, type LunoraProjectConfig, MUTATORS_FILENAME, type MaskProcedureIR, type MigrationIR, type MutatorIR, NOTIFY_FILENAME, OPENRPC_VERSION, type OpenApiEmitInput, type OpenRpcDocument, type OpenRpcEmitInput, type OpenRpcMethod, PROJECT_CONFIG_FILENAMES, type PlatformDiagnostic, type ProjectConfigLiterals, type ProjectIR, QUEUES_FILENAME, type QueryReadIR, type QueueIR, type RelationSnapshot, type RlsMetadataIR, type RlsPolicyIR, type RlsProcedureIR, type RlsRoleIR, type RuntimeVerb, SCHEMA_SNAPSHOT_FILENAME, SCHEMA_SNAPSHOT_VERSION, SDK_LANGUAGES, SDK_TARGETS, SHAPES_FILENAME, type SandboxUsage, type SchemaDrift, type SchemaDriftDecision, type SchemaIR, type SchemaSnapshot, SchemaSnapshotParseError, type SdkFiles, type SdkMethod, type SdkNamespace, type SdkRenderInput, type SdkResult, type SdkTarget, type ShapeIR, type StorageRuleIR, type StorageRulesMetadataIR, type TableIR, type TableSnapshot, VERSION, type ValidatorIR, type VectorIndexIR, WORKFLOWS_FILENAME, type WorkflowIR, type WranglerVariableIR, buildOpenApiDocument, buildOpenRpcDocument, buildSchemaSnapshot, createCodegenProject, describeErrorLevelFindings, diagnosticAt, diffSchemaSnapshots, discoverAgents, discoverAuthApiCalls, discoverContainers, discoverCrons, discoverFlags, discoverFunctions, discoverHttpRoutes, discoverHyperdriveCalls, discoverInserts, discoverMaskProcedures, discoverMigrations, discoverMutators, discoverNondeterministicCalls, discoverNotifyCalls, discoverNotifyConfig, discoverQueries, discoverQueues, discoverR2sqlCalls, discoverRlsMetadata, discoverRlsProcedures, discoverSandboxUsage, discoverSchema, discoverShapes, discoverStorageRulesMetadata, discoverWorkflows, emitAgents, emitApi, emitApp, emitCollections, emitContainers, emitCrons, emitDataModel, emitDrizzleSchema, emitFunctions, emitOpenApi, emitOpenApiModule, emitOpenRpc, emitOpenRpcModule, emitScheduler, emitServer, emitShard, emitVectors, emitWorkflows, emitWranglerCronTriggers, errorAdvisoryNames, errorPlatformDiagnosticNames, evaluateSchemaDrift, findProjectConfigFile, findTsconfig, formatAdvisories, generateSdk, isD1GlobalTable, isHyperdriveGlobalTable, isTypedSchema, lintSchema, listLunoraSourceFiles, loadProjectConfig, parseSchemaSnapshot, platformMatrixIds, readPackageDependencies, readProjectConfigLiterals, readProjectTarget, redact, refreshCodegenProject, resolveCodegenTarget, runCodegen, schemaFromIr, secretKindOf, serializeSchemaSnapshot, toAdvisorContext, validatorIrToJsonSchema };
|
|
4132
|
+
export { AGENTS_FILENAME, type AgentIR, type AuthApiCallIR, CONTAINERS_FILENAME, CodegenDiagnosticError, type CodegenOptions, type CodegenResult, type ContainerIR, type ContextPropertyCallIR, type CronJobIR, DEFAULT_TARGET, type DriftChange, type DriftRemediation, type DriftScope, type EmitAppOptions, FLAGS_FILENAME, type FieldSnapshot, type FlagsIR, type FunctionIR, GENERATED_HEADER, type HttpRouteIR, type IndexIR, type IndexSnapshot, type InsertWriteIR, LUNORA_ERROR_CODES, type LintSchemaOptions, type LoadedProjectConfig, type LunoraProjectConfig, MUTATORS_FILENAME, type MaskProcedureIR, type MigrationIR, type MutatorIR, NOTIFY_FILENAME, OPENRPC_VERSION, type OpenApiEmitInput, type OpenRpcDocument, type OpenRpcEmitInput, type OpenRpcMethod, PROJECT_CONFIG_FILENAMES, type PlatformDiagnostic, type ProjectConfigLiterals, type ProjectIR, QUEUES_FILENAME, type QueryReadIR, type QueueIR, type RelationSnapshot, type RlsMetadataIR, type RlsPolicyIR, type RlsProcedureIR, type RlsRoleIR, type RuntimeVerb, SCHEMA_SNAPSHOT_FILENAME, SCHEMA_SNAPSHOT_VERSION, SDK_LANGUAGES, SDK_TARGETS, SHAPES_FILENAME, type SandboxUsage, type SchemaDrift, type SchemaDriftDecision, type SchemaIR, type SchemaSnapshot, SchemaSnapshotParseError, type SdkFiles, type SdkMethod, type SdkNamespace, type SdkRenderInput, type SdkResult, type SdkTarget, type ShapeIR, type StorageRuleIR, type StorageRulesMetadataIR, type TableIR, type TableSnapshot, VERSION, type ValidatorIR, type VectorIndexIR, WORKFLOWS_FILENAME, type WorkflowIR, type WranglerVariableIR, buildOpenApiDocument, buildOpenRpcDocument, buildSchemaSnapshot, createCodegenProject, describeErrorLevelFindings, diagnosticAt, diffSchemaSnapshots, discoverAgents, discoverAuthApiCalls, discoverContainers, discoverCrons, discoverFlags, discoverFunctions, discoverHttpRoutes, discoverHyperdriveCalls, discoverInserts, discoverMaskProcedures, discoverMigrations, discoverMutators, discoverNondeterministicCalls, discoverNotifyCalls, discoverNotifyConfig, discoverQueries, discoverQueues, discoverR2sqlCalls, discoverRlsMetadata, discoverRlsProcedures, discoverSandboxUsage, discoverSchema, discoverShapes, discoverStorageRulesMetadata, discoverWorkflows, emitAgents, emitApi, emitApp, emitCollections, emitContainers, emitCrons, emitDataModel, emitDrizzleSchema, emitFunctions, emitOpenApi, emitOpenApiModule, emitOpenRpc, emitOpenRpcModule, emitScheduler, emitServer, emitShard, emitVectors, emitWorkflows, emitWranglerCronTriggers, errorAdvisoryNames, errorPlatformDiagnosticNames, evaluateSchemaDrift, findProjectConfigFile, findTsconfig, fingerprintSchemaSources, formatAdvisories, generateSdk, isD1GlobalTable, isHyperdriveGlobalTable, isTypedSchema, lintSchema, listLunoraSourceFiles, loadProjectConfig, parseSchemaSnapshot, platformMatrixIds, readPackageDependencies, readProjectConfigLiterals, readProjectTarget, redact, refreshCodegenProject, resolveCodegenTarget, runCodegen, schemaFromIr, secretKindOf, serializeSchemaSnapshot, sortedUniqueNames, toAdvisorContext, validatorIrToJsonSchema };
|
package/dist/index.d.ts
CHANGED
|
@@ -2761,16 +2761,16 @@ interface CodegenResult {
|
|
|
2761
2761
|
*/
|
|
2762
2762
|
writtenFiles: ReadonlyArray<string>;
|
|
2763
2763
|
}
|
|
2764
|
+
declare const sortedUniqueNames: (names: Iterable<string>) => ReadonlyArray<string>;
|
|
2764
2765
|
/** Deduplicated, sorted names of every ERROR-level advisory in `advisories`. */
|
|
2765
2766
|
declare const errorAdvisoryNames: (advisories: ReadonlyArray<Pick<Finding, "level" | "name">>) => ReadonlyArray<string>;
|
|
2766
2767
|
/** Deduplicated, sorted names of every error-level platform diagnostic in `platformDiagnostics`. */
|
|
2767
2768
|
declare const errorPlatformDiagnosticNames: (platformDiagnostics: ReadonlyArray<Pick<PlatformDiagnostic, "level" | "name">>) => ReadonlyArray<string>;
|
|
2768
2769
|
/**
|
|
2769
|
-
* Convenience read combining both categories from a full {@link CodegenResult}
|
|
2770
|
-
*
|
|
2771
|
-
*
|
|
2772
|
-
*
|
|
2773
|
-
* opt-out.
|
|
2770
|
+
* Convenience read combining both categories from a full {@link CodegenResult} —
|
|
2771
|
+
* the shape the bundler plugins need, which (unlike the CLI's `lunora
|
|
2772
|
+
* codegen`/`lunora deploy`) folds ERROR-level advisories and platform
|
|
2773
|
+
* diagnostics into a single blocking message with no strict/CI opt-out.
|
|
2774
2774
|
*/
|
|
2775
2775
|
declare const describeErrorLevelFindings: (result: Pick<CodegenResult, "advisories" | "platformDiagnostics">) => {
|
|
2776
2776
|
advisoryNames: ReadonlyArray<string>;
|
|
@@ -3786,6 +3786,34 @@ declare const evaluateSchemaDrift: (options: {
|
|
|
3786
3786
|
/** This run's declared migrations, so a new one is matched to the table it iterates. */
|
|
3787
3787
|
migrations: ReadonlyArray<Pick<MigrationIR, "id" | "table">>;
|
|
3788
3788
|
}) => SchemaDriftDecision;
|
|
3789
|
+
/**
|
|
3790
|
+
* Content hash of the schema directory's TypeScript sources — everything codegen
|
|
3791
|
+
* reads, minus its own `_generated/` output.
|
|
3792
|
+
*
|
|
3793
|
+
* Taken before codegen runs and compared against the previous run's, this is what
|
|
3794
|
+
* tells a developer's save apart from a write the `postcodegen` hook made itself.
|
|
3795
|
+
* Timing cannot: both look identical to a watcher, which is why every save during
|
|
3796
|
+
* a multi-second hook used to be dropped outright. Content can — a formatter that
|
|
3797
|
+
* rewrites a file to the same bytes leaves the hash alone, and a real edit does not.
|
|
3798
|
+
*
|
|
3799
|
+
* Crucially the set EXCLUDES `_generated/`, so a hook that rewrites generated
|
|
3800
|
+
* output (a formatter, a codemod) does not read as a source change. That is what
|
|
3801
|
+
* lets a bundler plugin watch the whole schema directory — the only way a newly
|
|
3802
|
+
* created `lunora/foo.ts` is ever noticed — without the hook's own writes
|
|
3803
|
+
* retriggering it forever.
|
|
3804
|
+
*
|
|
3805
|
+
* The file set comes from codegen's own `listLunoraSourceFiles` (plus
|
|
3806
|
+
* `schema.ts`, which discovery loads separately), so "what codegen reads" is one
|
|
3807
|
+
* decision rather than two that drift: a `readdirSync` walk of its own silently
|
|
3808
|
+
* disagreed about symlinked sources, which is exactly the case where a
|
|
3809
|
+
* regeneration must not be judged a no-op.
|
|
3810
|
+
*
|
|
3811
|
+
* Cheap by construction (a schema directory is a handful of files, read once per
|
|
3812
|
+
* regeneration, not per watcher event). An unreadable directory hashes to a
|
|
3813
|
+
* constant so a transient read error reads as "no change" rather than as an
|
|
3814
|
+
* edit — degrading toward doing nothing, never toward a spurious rerun.
|
|
3815
|
+
*/
|
|
3816
|
+
declare const fingerprintSchemaSources: (schemaDirectory: string) => string;
|
|
3789
3817
|
/**
|
|
3790
3818
|
* Convert a {@link SchemaIR} into a synthetic runtime {@link Schema} carrying just
|
|
3791
3819
|
* the `tables[name].shape` surface `@lunora/seed` introspects. System columns
|
|
@@ -4101,4 +4129,4 @@ declare const secretKindOf: (value: string) => string | undefined;
|
|
|
4101
4129
|
/** A redacted preview of a secret value — first 4 chars plus its length, never the full value. */
|
|
4102
4130
|
declare const redact: (value: string) => string;
|
|
4103
4131
|
declare const VERSION = "0.0.0";
|
|
4104
|
-
export { AGENTS_FILENAME, type AgentIR, type AuthApiCallIR, CONTAINERS_FILENAME, CodegenDiagnosticError, type CodegenOptions, type CodegenResult, type ContainerIR, type ContextPropertyCallIR, type CronJobIR, DEFAULT_TARGET, type DriftChange, type DriftRemediation, type DriftScope, type EmitAppOptions, FLAGS_FILENAME, type FieldSnapshot, type FlagsIR, type FunctionIR, GENERATED_HEADER, type HttpRouteIR, type IndexIR, type IndexSnapshot, type InsertWriteIR, LUNORA_ERROR_CODES, type LintSchemaOptions, type LoadedProjectConfig, type LunoraProjectConfig, MUTATORS_FILENAME, type MaskProcedureIR, type MigrationIR, type MutatorIR, NOTIFY_FILENAME, OPENRPC_VERSION, type OpenApiEmitInput, type OpenRpcDocument, type OpenRpcEmitInput, type OpenRpcMethod, PROJECT_CONFIG_FILENAMES, type PlatformDiagnostic, type ProjectConfigLiterals, type ProjectIR, QUEUES_FILENAME, type QueryReadIR, type QueueIR, type RelationSnapshot, type RlsMetadataIR, type RlsPolicyIR, type RlsProcedureIR, type RlsRoleIR, type RuntimeVerb, SCHEMA_SNAPSHOT_FILENAME, SCHEMA_SNAPSHOT_VERSION, SDK_LANGUAGES, SDK_TARGETS, SHAPES_FILENAME, type SandboxUsage, type SchemaDrift, type SchemaDriftDecision, type SchemaIR, type SchemaSnapshot, SchemaSnapshotParseError, type SdkFiles, type SdkMethod, type SdkNamespace, type SdkRenderInput, type SdkResult, type SdkTarget, type ShapeIR, type StorageRuleIR, type StorageRulesMetadataIR, type TableIR, type TableSnapshot, VERSION, type ValidatorIR, type VectorIndexIR, WORKFLOWS_FILENAME, type WorkflowIR, type WranglerVariableIR, buildOpenApiDocument, buildOpenRpcDocument, buildSchemaSnapshot, createCodegenProject, describeErrorLevelFindings, diagnosticAt, diffSchemaSnapshots, discoverAgents, discoverAuthApiCalls, discoverContainers, discoverCrons, discoverFlags, discoverFunctions, discoverHttpRoutes, discoverHyperdriveCalls, discoverInserts, discoverMaskProcedures, discoverMigrations, discoverMutators, discoverNondeterministicCalls, discoverNotifyCalls, discoverNotifyConfig, discoverQueries, discoverQueues, discoverR2sqlCalls, discoverRlsMetadata, discoverRlsProcedures, discoverSandboxUsage, discoverSchema, discoverShapes, discoverStorageRulesMetadata, discoverWorkflows, emitAgents, emitApi, emitApp, emitCollections, emitContainers, emitCrons, emitDataModel, emitDrizzleSchema, emitFunctions, emitOpenApi, emitOpenApiModule, emitOpenRpc, emitOpenRpcModule, emitScheduler, emitServer, emitShard, emitVectors, emitWorkflows, emitWranglerCronTriggers, errorAdvisoryNames, errorPlatformDiagnosticNames, evaluateSchemaDrift, findProjectConfigFile, findTsconfig, formatAdvisories, generateSdk, isD1GlobalTable, isHyperdriveGlobalTable, isTypedSchema, lintSchema, listLunoraSourceFiles, loadProjectConfig, parseSchemaSnapshot, platformMatrixIds, readPackageDependencies, readProjectConfigLiterals, readProjectTarget, redact, refreshCodegenProject, resolveCodegenTarget, runCodegen, schemaFromIr, secretKindOf, serializeSchemaSnapshot, toAdvisorContext, validatorIrToJsonSchema };
|
|
4132
|
+
export { AGENTS_FILENAME, type AgentIR, type AuthApiCallIR, CONTAINERS_FILENAME, CodegenDiagnosticError, type CodegenOptions, type CodegenResult, type ContainerIR, type ContextPropertyCallIR, type CronJobIR, DEFAULT_TARGET, type DriftChange, type DriftRemediation, type DriftScope, type EmitAppOptions, FLAGS_FILENAME, type FieldSnapshot, type FlagsIR, type FunctionIR, GENERATED_HEADER, type HttpRouteIR, type IndexIR, type IndexSnapshot, type InsertWriteIR, LUNORA_ERROR_CODES, type LintSchemaOptions, type LoadedProjectConfig, type LunoraProjectConfig, MUTATORS_FILENAME, type MaskProcedureIR, type MigrationIR, type MutatorIR, NOTIFY_FILENAME, OPENRPC_VERSION, type OpenApiEmitInput, type OpenRpcDocument, type OpenRpcEmitInput, type OpenRpcMethod, PROJECT_CONFIG_FILENAMES, type PlatformDiagnostic, type ProjectConfigLiterals, type ProjectIR, QUEUES_FILENAME, type QueryReadIR, type QueueIR, type RelationSnapshot, type RlsMetadataIR, type RlsPolicyIR, type RlsProcedureIR, type RlsRoleIR, type RuntimeVerb, SCHEMA_SNAPSHOT_FILENAME, SCHEMA_SNAPSHOT_VERSION, SDK_LANGUAGES, SDK_TARGETS, SHAPES_FILENAME, type SandboxUsage, type SchemaDrift, type SchemaDriftDecision, type SchemaIR, type SchemaSnapshot, SchemaSnapshotParseError, type SdkFiles, type SdkMethod, type SdkNamespace, type SdkRenderInput, type SdkResult, type SdkTarget, type ShapeIR, type StorageRuleIR, type StorageRulesMetadataIR, type TableIR, type TableSnapshot, VERSION, type ValidatorIR, type VectorIndexIR, WORKFLOWS_FILENAME, type WorkflowIR, type WranglerVariableIR, buildOpenApiDocument, buildOpenRpcDocument, buildSchemaSnapshot, createCodegenProject, describeErrorLevelFindings, diagnosticAt, diffSchemaSnapshots, discoverAgents, discoverAuthApiCalls, discoverContainers, discoverCrons, discoverFlags, discoverFunctions, discoverHttpRoutes, discoverHyperdriveCalls, discoverInserts, discoverMaskProcedures, discoverMigrations, discoverMutators, discoverNondeterministicCalls, discoverNotifyCalls, discoverNotifyConfig, discoverQueries, discoverQueues, discoverR2sqlCalls, discoverRlsMetadata, discoverRlsProcedures, discoverSandboxUsage, discoverSchema, discoverShapes, discoverStorageRulesMetadata, discoverWorkflows, emitAgents, emitApi, emitApp, emitCollections, emitContainers, emitCrons, emitDataModel, emitDrizzleSchema, emitFunctions, emitOpenApi, emitOpenApiModule, emitOpenRpc, emitOpenRpcModule, emitScheduler, emitServer, emitShard, emitVectors, emitWorkflows, emitWranglerCronTriggers, errorAdvisoryNames, errorPlatformDiagnosticNames, evaluateSchemaDrift, findProjectConfigFile, findTsconfig, fingerprintSchemaSources, formatAdvisories, generateSdk, isD1GlobalTable, isHyperdriveGlobalTable, isTypedSchema, lintSchema, listLunoraSourceFiles, loadProjectConfig, parseSchemaSnapshot, platformMatrixIds, readPackageDependencies, readProjectConfigLiterals, readProjectTarget, redact, refreshCodegenProject, resolveCodegenTarget, runCodegen, schemaFromIr, secretKindOf, serializeSchemaSnapshot, sortedUniqueNames, toAdvisorContext, validatorIrToJsonSchema };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SCHEMA_SNAPSHOT_VERSION as t,diffSchemaSnapshots as s,serializeSchemaSnapshot as a}from"./packem_shared/SCHEMA_SNAPSHOT_VERSION-C0oHwiJZ.mjs";import{formatAdvisories as m,lintSchema as d,toAdvisorContext as f}from"./packem_shared/formatAdvisories-DwmUKYuc.mjs";import{describeErrorLevelFindings as c,errorAdvisoryNames as n,errorPlatformDiagnosticNames as l}from"./packem_shared/describeErrorLevelFindings-
|
|
1
|
+
import{SCHEMA_SNAPSHOT_VERSION as t,diffSchemaSnapshots as s,serializeSchemaSnapshot as a}from"./packem_shared/SCHEMA_SNAPSHOT_VERSION-C0oHwiJZ.mjs";import{formatAdvisories as m,lintSchema as d,toAdvisorContext as f}from"./packem_shared/formatAdvisories-DwmUKYuc.mjs";import{describeErrorLevelFindings as c,errorAdvisoryNames as n,errorPlatformDiagnosticNames as l,sortedUniqueNames as S}from"./packem_shared/describeErrorLevelFindings-vzaGS9KL.mjs";import{CodegenDiagnosticError as E,diagnosticAt as u}from"./packem_shared/CodegenDiagnosticError-BUXlG3P-.mjs";import{AGENTS_FILENAME as v,discoverAgents as N}from"./packem_shared/AGENTS_FILENAME-DoPI92Wu.mjs";import{listLunoraSourceFiles as C}from"./packem_shared/listLunoraSourceFiles-DP-5e-RE.mjs";import{default as R}from"./packem_shared/discoverAuthApiCalls-FxrdBeVt.mjs";import{CONTAINERS_FILENAME as M,discoverContainers as T}from"./packem_shared/CONTAINERS_FILENAME-B6TFs82W.mjs";import{default as L}from"./packem_shared/discoverCrons-MfKw7IFf.mjs";import{FLAGS_FILENAME as I,discoverFlags as P}from"./packem_shared/FLAGS_FILENAME-BedPDCsR.mjs";import{default as G}from"./packem_shared/discoverFunctions-BsmX-sEq.mjs";import{default as b}from"./packem_shared/discoverHttpRoutes-BcXI9CNt.mjs";import{default as j}from"./packem_shared/discoverHyperdriveCalls-D9qXqTq3.mjs";import{default as k}from"./packem_shared/discoverInserts-CFJ3IVeI.mjs";import{d as K}from"./packem_shared/index-BoaHhVtM.mjs";import{default as z}from"./packem_shared/discoverMigrations-DbrHwcGE.mjs";import{MUTATORS_FILENAME as q,discoverMutators as w}from"./packem_shared/MUTATORS_FILENAME-B6cKrN_m.mjs";import{default as B}from"./packem_shared/discoverNondeterministicCalls-CSQ_GDcA.mjs";import{NOTIFY_FILENAME as X,discoverNotifyCalls as Z,discoverNotifyConfig as $}from"./packem_shared/NOTIFY_FILENAME-Cri3NT5U.mjs";import{default as re}from"./packem_shared/readPackageDependencies-C6h6FZuP.mjs";import{d as te}from"./packem_shared/queries-B-f4jO-x.mjs";import{QUEUES_FILENAME as ae,discoverQueues as ie}from"./packem_shared/QUEUES_FILENAME-CxkPcMH1.mjs";import{default as de}from"./packem_shared/discoverR2sqlCalls-fu7fC0i_.mjs";import{default as pe}from"./packem_shared/discoverRlsProcedures-BO4qC77y.mjs";import{default as ne}from"./packem_shared/discoverRlsMetadata-CPmAGL0W.mjs";import{discoverSandboxUsage as Se}from"./packem_shared/discoverSandboxUsage-CgmfgDTS.mjs";import{default as Ee}from"./packem_shared/discoverSchema-D8DBDHEg.mjs";import{SHAPES_FILENAME as Ae,discoverShapes as ve}from"./packem_shared/SHAPES_FILENAME-zJgzynXR.mjs";import{default as ge}from"./packem_shared/discoverStorageRulesMetadata-D8VYflWt.mjs";import{WORKFLOWS_FILENAME as Oe,discoverWorkflows as Re}from"./packem_shared/WORKFLOWS_FILENAME-B_ZJxRSx.mjs";import{G as Me,e as Te,a as _e,b as Le,c as Fe,d as Ie,f as Pe,g as De,h as Ge,i as Ue,j as be,k as He,l as je,m as ye,n as ke}from"./packem_shared/emit-DUpkZ68h.mjs";import{emitApp as Ke}from"./packem_shared/emitApp-CTLwFZHO.mjs";import{isD1GlobalTable as ze,isHyperdriveGlobalTable as Qe}from"./packem_shared/isD1GlobalTable-udvHAAzD.mjs";import{buildOpenApiDocument as we,emitOpenApi as Je,emitOpenApiModule as Be}from"./packem_shared/buildOpenApiDocument-C7S5wJCl.mjs";import{OPENRPC_VERSION as Xe,buildOpenRpcDocument as Ze,emitOpenRpc as $e,emitOpenRpcModule as er}from"./packem_shared/OPENRPC_VERSION-CL0VnCPW.mjs";import{DEFAULT_TARGET as or,platformMatrixIds as tr,readProjectTarget as sr,resolveCodegenTarget as ar}from"./packem_shared/DEFAULT_TARGET-kmm2i4Fw.mjs";import{loadProjectConfig as mr,readProjectConfigLiterals as dr}from"./packem_shared/loadProjectConfig-CKsFNgn3.mjs";import{SCHEMA_SNAPSHOT_FILENAME as pr,createCodegenProject as cr,findTsconfig as nr,refreshCodegenProject as lr,runCodegen as Sr}from"./packem_shared/SCHEMA_SNAPSHOT_FILENAME-BtMVx-4j.mjs";import{SchemaSnapshotParseError as Er,buildSchemaSnapshot as ur,evaluateSchemaDrift as Ar,parseSchemaSnapshot as vr}from"./packem_shared/SchemaSnapshotParseError-CPOXlFhI.mjs";import{default as gr}from"./packem_shared/fingerprintSchemaSources-L3nGKDQt.mjs";import{schemaFromIr as Or}from"./packem_shared/schemaFromIr-BWFnvCVg.mjs";import{LUNORA_ERROR_CODES as hr,validatorIrToJsonSchema as Mr}from"./packem_shared/LUNORA_ERROR_CODES-C2s0xWQD.mjs";import{SDK_LANGUAGES as _r,SDK_TARGETS as Lr,generateSdk as Fr}from"./packem_shared/SDK_LANGUAGES-Df_CnJx5.mjs";import{redact as Pr,secretKindOf as Dr}from"./packem_shared/redact-Cy14LEnc.mjs";import{MESSAGE_SOLUTIONS as Ur,findSolutionByMessage as br}from"@lunora/errors";import{PROJECT_CONFIG_FILENAMES as jr,findProjectConfigFile as yr}from"./packem_shared/PROJECT_CONFIG_FILENAMES-DzOu-lSc.mjs";import{isTypedSchema as Wr}from"./packem_shared/isTypedSchema-CKzc3ioR.mjs";const e="0.0.0";export{v as AGENTS_FILENAME,M as CONTAINERS_FILENAME,E as CodegenDiagnosticError,or as DEFAULT_TARGET,I as FLAGS_FILENAME,Me as GENERATED_HEADER,hr as LUNORA_ERROR_CODES,Ur as LUNORA_SOLUTION_RULES,q as MUTATORS_FILENAME,X as NOTIFY_FILENAME,Xe as OPENRPC_VERSION,jr as PROJECT_CONFIG_FILENAMES,ae as QUEUES_FILENAME,pr as SCHEMA_SNAPSHOT_FILENAME,t as SCHEMA_SNAPSHOT_VERSION,_r as SDK_LANGUAGES,Lr as SDK_TARGETS,Ae as SHAPES_FILENAME,Er as SchemaSnapshotParseError,e as VERSION,Oe as WORKFLOWS_FILENAME,we as buildOpenApiDocument,Ze as buildOpenRpcDocument,ur as buildSchemaSnapshot,cr as createCodegenProject,c as describeErrorLevelFindings,u as diagnosticAt,s as diffSchemaSnapshots,N as discoverAgents,R as discoverAuthApiCalls,T as discoverContainers,L as discoverCrons,P as discoverFlags,G as discoverFunctions,b as discoverHttpRoutes,j as discoverHyperdriveCalls,k as discoverInserts,K as discoverMaskProcedures,z as discoverMigrations,w as discoverMutators,B as discoverNondeterministicCalls,Z as discoverNotifyCalls,$ as discoverNotifyConfig,te as discoverQueries,ie as discoverQueues,de as discoverR2sqlCalls,ne as discoverRlsMetadata,pe as discoverRlsProcedures,Se as discoverSandboxUsage,Ee as discoverSchema,ve as discoverShapes,ge as discoverStorageRulesMetadata,Re as discoverWorkflows,Te as emitAgents,_e as emitApi,Ke as emitApp,Le as emitCollections,Fe as emitContainers,Ie as emitCrons,Pe as emitDataModel,De as emitDrizzleSchema,Ge as emitFunctions,Je as emitOpenApi,Be as emitOpenApiModule,$e as emitOpenRpc,er as emitOpenRpcModule,Ue as emitScheduler,be as emitServer,He as emitShard,je as emitVectors,ye as emitWorkflows,ke as emitWranglerCronTriggers,n as errorAdvisoryNames,l as errorPlatformDiagnosticNames,Ar as evaluateSchemaDrift,br as findLunoraSolution,yr as findProjectConfigFile,nr as findTsconfig,gr as fingerprintSchemaSources,m as formatAdvisories,Fr as generateSdk,ze as isD1GlobalTable,Qe as isHyperdriveGlobalTable,Wr as isTypedSchema,d as lintSchema,C as listLunoraSourceFiles,mr as loadProjectConfig,vr as parseSchemaSnapshot,tr as platformMatrixIds,re as readPackageDependencies,dr as readProjectConfigLiterals,sr as readProjectTarget,Pr as redact,lr as refreshCodegenProject,ar as resolveCodegenTarget,Sr as runCodegen,Or as schemaFromIr,Dr as secretKindOf,a as serializeSchemaSnapshot,S as sortedUniqueNames,f as toAdvisorContext,Mr as validatorIrToJsonSchema};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const o=r=>[...new Set(r)].toSorted((e,a)=>e.localeCompare(a)),s=r=>o(r.filter(e=>e.level==="ERROR").map(e=>e.name)),t=r=>o(r.filter(e=>e.level==="error").map(e=>e.name)),i=r=>({advisoryNames:s(r.advisories),platformDiagnosticNames:t(r.platformDiagnostics)});export{i as describeErrorLevelFindings,s as errorAdvisoryNames,t as errorPlatformDiagnosticNames};
|
|
1
|
+
const o=r=>[...new Set(r)].toSorted((e,a)=>e.localeCompare(a)),s=r=>o(r.filter(e=>e.level==="ERROR").map(e=>e.name)),t=r=>o(r.filter(e=>e.level==="error").map(e=>e.name)),i=r=>({advisoryNames:s(r.advisories),platformDiagnosticNames:t(r.platformDiagnostics)});export{i as describeErrorLevelFindings,s as errorAdvisoryNames,t as errorPlatformDiagnosticNames,o as sortedUniqueNames};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createHash as c}from"node:crypto";import{existsSync as s,readFileSync as i}from"node:fs";import{join as h}from"node:path";import{listLunoraSourceFiles as u}from"./listLunoraSourceFiles-DP-5e-RE.mjs";const S=t=>{if(!s(t))return"unreadable";const e=u(t),o=h(t,"schema.ts");s(o)&&e.push(o);const r=c("sha256");for(const a of e.toSorted((n,p)=>n.localeCompare(p)))try{r.update(a).update("\0").update(i(a))}catch{}return r.digest("hex")};export{S as default};
|