@playcraft/build 0.1.96-test-a → 0.1.98

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 (113) hide show
  1. package/dist/base-builder.js +2 -41
  2. package/dist/engines/engine-detector.js +0 -4
  3. package/dist/engines/generic-adapter.js +19 -14
  4. package/dist/index.d.ts +4 -19
  5. package/dist/index.js +2 -11
  6. package/dist/platforms/adikteev.js +0 -1
  7. package/dist/platforms/applovin.js +0 -1
  8. package/dist/platforms/base.js +2 -2
  9. package/dist/platforms/bigo.js +0 -1
  10. package/dist/platforms/facebook.js +0 -1
  11. package/dist/platforms/google.js +0 -1
  12. package/dist/platforms/inmobi.js +0 -1
  13. package/dist/platforms/ironsource.js +0 -1
  14. package/dist/platforms/liftoff.js +0 -1
  15. package/dist/platforms/mintegral.js +0 -1
  16. package/dist/platforms/moloco.js +0 -1
  17. package/dist/platforms/playcraft.js +0 -1
  18. package/dist/platforms/remerge.js +0 -1
  19. package/dist/platforms/snapchat.js +0 -1
  20. package/dist/platforms/tiktok.js +0 -1
  21. package/dist/platforms/unity.js +0 -1
  22. package/dist/types.d.ts +0 -5
  23. package/dist/validation/html-validator.d.ts +0 -5
  24. package/dist/validation/html-validator.js +17 -19
  25. package/dist/validation/index.d.ts +0 -4
  26. package/dist/validation/index.js +0 -4
  27. package/dist/validation/package-validator.d.ts +0 -2
  28. package/dist/validation/package-validator.js +64 -25
  29. package/dist/validation/profiles.d.ts +1 -13
  30. package/dist/validation/profiles.js +0 -27
  31. package/dist/validation/source-scanner.d.ts +0 -11
  32. package/dist/validation/source-scanner.js +2 -32
  33. package/dist/validation/types.d.ts +2 -178
  34. package/dist/validation/types.js +1 -1
  35. package/dist/validation/validation-runner.d.ts +2 -22
  36. package/dist/validation/validation-runner.js +3 -64
  37. package/dist/validation/zip-reader.d.ts +0 -7
  38. package/dist/validation/zip-reader.js +26 -159
  39. package/dist/vite/config-builder-generic.d.ts +1 -3
  40. package/dist/vite/config-builder-generic.js +7 -9
  41. package/dist/vite/config-builder.js +1 -1
  42. package/dist/vite/plugin-platform.js +54 -30
  43. package/dist/vite/plugin-source-builder.d.ts +14 -2
  44. package/dist/vite/plugin-source-builder.js +997 -61
  45. package/dist/vite-builder.d.ts +5 -4
  46. package/dist/vite-builder.js +34 -33
  47. package/package.json +4 -16
  48. package/dist/audio-source-files.d.ts +0 -5
  49. package/dist/audio-source-files.js +0 -135
  50. package/dist/delivery/agent-build-runner.d.ts +0 -44
  51. package/dist/delivery/agent-build-runner.js +0 -365
  52. package/dist/delivery/agent-build-source.d.ts +0 -8
  53. package/dist/delivery/agent-build-source.js +0 -25
  54. package/dist/delivery/artifact-descriptor.d.ts +0 -31
  55. package/dist/delivery/artifact-descriptor.js +0 -237
  56. package/dist/delivery/artifact-package.d.ts +0 -43
  57. package/dist/delivery/artifact-package.js +0 -283
  58. package/dist/delivery/build-plan.d.ts +0 -4
  59. package/dist/delivery/build-plan.js +0 -189
  60. package/dist/delivery/build-plan.types.d.ts +0 -51
  61. package/dist/delivery/build-plan.types.js +0 -1
  62. package/dist/delivery/command-isolation.d.ts +0 -21
  63. package/dist/delivery/command-isolation.js +0 -327
  64. package/dist/delivery/commands.d.ts +0 -5
  65. package/dist/delivery/commands.js +0 -146
  66. package/dist/delivery/files.d.ts +0 -9
  67. package/dist/delivery/files.js +0 -144
  68. package/dist/delivery/git-source-fingerprint.d.ts +0 -2
  69. package/dist/delivery/git-source-fingerprint.js +0 -58
  70. package/dist/delivery/isolated-source.d.ts +0 -5
  71. package/dist/delivery/isolated-source.js +0 -131
  72. package/dist/delivery/output-publication.d.ts +0 -21
  73. package/dist/delivery/output-publication.js +0 -444
  74. package/dist/delivery/project-delivery.d.ts +0 -6
  75. package/dist/delivery/project-delivery.js +0 -287
  76. package/dist/delivery/recipe-build-plan.d.ts +0 -4
  77. package/dist/delivery/recipe-build-plan.js +0 -53
  78. package/dist/delivery/recipe.d.ts +0 -20
  79. package/dist/delivery/recipe.js +0 -211
  80. package/dist/delivery/safe-path.d.ts +0 -2
  81. package/dist/delivery/safe-path.js +0 -18
  82. package/dist/delivery/types.d.ts +0 -76
  83. package/dist/delivery/types.js +0 -1
  84. package/dist/production-animation-presence.d.ts +0 -2
  85. package/dist/production-animation-presence.js +0 -146
  86. package/dist/production-inputs.d.ts +0 -30
  87. package/dist/production-inputs.js +0 -262
  88. package/dist/production-source-paths.d.ts +0 -5
  89. package/dist/production-source-paths.js +0 -27
  90. package/dist/validation/artifact-qa.d.ts +0 -36
  91. package/dist/validation/artifact-qa.js +0 -261
  92. package/dist/validation/artifact-rules.d.ts +0 -39
  93. package/dist/validation/artifact-rules.js +0 -451
  94. package/dist/validation/artifact.d.ts +0 -14
  95. package/dist/validation/artifact.js +0 -188
  96. package/dist/validation/runtime-load.d.ts +0 -94
  97. package/dist/validation/runtime-load.js +0 -653
  98. package/dist/vite/source-builder-asset-paths.d.ts +0 -25
  99. package/dist/vite/source-builder-asset-paths.js +0 -154
  100. package/dist/vite/source-builder-esm.d.ts +0 -7
  101. package/dist/vite/source-builder-esm.js +0 -877
  102. package/dist/vite/source-builder-types.d.ts +0 -14
  103. package/dist/vite/source-builder-types.js +0 -1
  104. package/dist/vite/workspace.d.ts +0 -6
  105. package/dist/vite/workspace.js +0 -41
  106. package/dist/workspace-css-imports.d.ts +0 -2
  107. package/dist/workspace-css-imports.js +0 -139
  108. package/dist/workspace-model-source.d.ts +0 -14
  109. package/dist/workspace-model-source.js +0 -184
  110. package/dist/workspace-public-imports.d.ts +0 -11
  111. package/dist/workspace-public-imports.js +0 -232
  112. package/dist/workspace-public-source.d.ts +0 -15
  113. package/dist/workspace-public-source.js +0 -564
@@ -1,94 +0,0 @@
1
- import type { Platform } from '../types.js';
2
- import type { BrowserDriver, PlayableArtifact, RuntimeViewport, ValidationResult } from './types.js';
3
- /**
4
- * `runtime-load` rules: open the artifact in a headless browser without playing it. All network
5
- * access outside the artifact is blocked, store-opening calls are recorded instead of followed,
6
- * and the CTA chain is exercised through whichever CTA entry the artifact has: adsdk's
7
- * `window.PlayableSDK`, or the platform-injected CTA adapter's `window.PlayCraftCTA`. Either is
8
- * accepted; what matters is that the CTA reaches the channel's store API.
9
- */
10
- export declare const RUNTIME_LOAD_RULE_IDS: {
11
- readonly pageLoads: "common.runtime.page.loads";
12
- readonly requests: "common.runtime.requests.resolved";
13
- readonly csp: "common.runtime.csp.clean";
14
- readonly errors: "common.runtime.errors.none";
15
- readonly firstFrame: "common.runtime.first-frame.content";
16
- readonly ctaEntry: "common.runtime.cta.entry";
17
- readonly startSignal: "common.runtime.start-signal.sent";
18
- readonly noAutoRedirect: "common.runtime.redirect.none-on-load";
19
- readonly ctaRouted: "common.runtime.cta.routed";
20
- readonly ctaStoreUrl: "common.runtime.cta.store-url";
21
- readonly viewportCanvasFit: "common.runtime.viewport.canvas-fit";
22
- readonly viewportOverflow: "common.runtime.viewport.no-overflow";
23
- readonly viewportErrors: "common.runtime.viewport.errors";
24
- readonly viewportContent: "common.runtime.viewport.content";
25
- };
26
- export type RuntimeLoadRuleId = (typeof RUNTIME_LOAD_RULE_IDS)[keyof typeof RUNTIME_LOAD_RULE_IDS];
27
- export interface RuntimeViewportPreset {
28
- /** Shown in evidence, e.g. `iphone16 portrait`. */
29
- name: string;
30
- viewport: RuntimeViewport;
31
- }
32
- export interface RuntimeLoadOptions {
33
- driver: BrowserDriver;
34
- profile: Platform;
35
- /**
36
- * Viewports to open the artifact in. The first one also runs the CTA checks. Callers pass
37
- * presets from `@playcraft/common/preview/preview-devices`; default is one phone portrait.
38
- */
39
- viewports?: RuntimeViewportPreset[];
40
- /** Wait after the load event before inspecting the page. Default 1500 ms. */
41
- settleMs?: number;
42
- /** Navigation timeout. Default 15000 ms. */
43
- timeoutMs?: number;
44
- }
45
- export declare const RUNTIME_ORIGIN = "http://artifact.playcraft-qa.test";
46
- /** Same-origin artifact files and inline data only; no network, workers or frames. */
47
- export declare const RUNTIME_CSP: string;
48
- export declare function channelGlobalsFor(profile: Platform): string[];
49
- /** Names of the viewports `runRuntimeLoadChecks` opens, for reports. */
50
- export declare function runtimeViewportNames(viewports?: RuntimeViewportPreset[]): string[];
51
- /**
52
- * Opens the artifact in a headless browser and returns every `runtime-load` result. When the page
53
- * does not load, only the page-load result is returned.
54
- */
55
- export declare function runRuntimeLoadChecks(artifact: PlayableArtifact, options: RuntimeLoadOptions): Promise<ValidationResult[]>;
56
- /**
57
- * Script injected before any page script during runtime QA. It records, without side effects:
58
- * store-opening calls (channel SDK APIs, `window.open`, `postMessage('download')`), adsdk events
59
- * (via `window.PlayableSDK.on`), and CSP violations. Results live on `window.__PLAYCRAFT_QA__`.
60
- *
61
- * adsdk picks the channel from build-time constants (`AD_NETWORK`, `AD_PROTOCOL`) and only checks
62
- * that the channel's global exists. The platform CTA adapter instead picks the channel by which
63
- * global exists, so only the profile's own channel globals are stubbed (`channelGlobalsFor`).
64
- * Stubs are defined only when the page has none, matching the platform fallbacks in
65
- * `packages/build/src/platforms/*.ts`.
66
- */
67
- /** adsdk events the probe subscribes to. */
68
- export declare const ADSDK_PROBE_EVENTS: readonly ["playcraftInit", "playcraftReady", "playcraftStart", "playcraftInteractive", "playcraftFinish", "playcraftInstall"];
69
- export interface RuntimeProbeOptions {
70
- /** Channel SDK globals to install recording stubs for; see `channelGlobalsFor`. */
71
- channelGlobals: string[];
72
- }
73
- export interface RuntimeProbeCall {
74
- api: string;
75
- url?: string;
76
- at: number;
77
- }
78
- export interface RuntimeProbeState {
79
- calls: RuntimeProbeCall[];
80
- events: Array<{
81
- name: string;
82
- at: number;
83
- }>;
84
- csp: Array<{
85
- blockedURI: string;
86
- violatedDirective: string;
87
- }>;
88
- sdk: boolean;
89
- /** The platform CTA adapter (`window.PlayCraftCTA.jump`) is present. */
90
- adapter: boolean;
91
- /** The export wrote store links for the CTA adapter (`window.__PLAYCRAFT_STORE_URLS__`). */
92
- storeUrls: boolean;
93
- }
94
- export declare function buildRuntimeProbeScript(options: RuntimeProbeOptions): string;