@dpdpguard/react-native 1.0.0 → 1.1.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.
@@ -1,31 +0,0 @@
1
- #!/usr/bin/env node
2
- import { spawnSync } from "node:child_process";
3
- import { existsSync } from "node:fs";
4
- import { dirname, join } from "node:path";
5
- import { fileURLToPath } from "node:url";
6
-
7
- /**
8
- * Regenerates src/generated/api-types.ts from the installed
9
- * @dpdpguard/contract's openapi/v1.yaml. Run after every install/update of
10
- * @dpdpguard/contract, or via `npm run codegen`.
11
- *
12
- * Uses `npx openapi-typescript` rather than a devDependency, matching
13
- * dpdpguard-server-sdk's approach — keeps this repo's own TypeScript
14
- * version free of a forced peer-dependency resolution.
15
- */
16
- const repoRoot = join(dirname(fileURLToPath(import.meta.url)), "..");
17
- const specPath = join(repoRoot, "node_modules", "@dpdpguard", "contract", "openapi", "v1.yaml");
18
- const outPath = join(repoRoot, "src", "generated", "api-types.ts");
19
-
20
- if (!existsSync(specPath)) {
21
- console.error(`codegen: ${specPath} not found — is @dpdpguard/contract installed? Run npm install first.`);
22
- process.exit(1);
23
- }
24
-
25
- const result = spawnSync(
26
- "npx",
27
- ["--yes", "openapi-typescript@7", specPath, "-o", outPath],
28
- { stdio: "inherit", shell: process.platform === "win32" },
29
- );
30
-
31
- process.exit(result.status ?? 1);