File: skip-network-connection-during-build.patch

package info (click to toggle)
ts-node 10.9.2%2B~cs64.13.20-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,388 kB
  • sloc: javascript: 15,071; sh: 83; makefile: 15; xml: 9
file content (42 lines) | stat: -rw-r--r-- 1,403 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Description: skip network connection
Author: Yadd <yadd@debian.org>
Forwarded: not-needed
Last-Update: 2022-06-09

--- a/scripts/create-merged-schema.ts
+++ b/scripts/create-merged-schema.ts
@@ -8,11 +8,12 @@
 
 import axios from 'axios';
 import { resolve } from 'path';
-import { writeFileSync } from 'fs';
+import { writeFileSync, readFileSync } from 'fs';
 
 async function main() {
   /** schemastore definition */
-  const schemastoreSchema = await getSchemastoreSchema();
+// @ts-ignore
+  const schemastoreSchema = JSON.parse(readFileSync('debian/tsconfig.json'));
 
   /** ts-node schema auto-generated from ts-node source code */
   const originalTsNodeSchema = require('../tsconfig.schema.json');
@@ -39,6 +40,7 @@
     ...schemastoreSchema,
     definitions: {
       ...Object.fromEntries(
+// @ts-ignore
         Object.entries(schemastoreSchema.definitions).filter(
           ([key]) => !key.startsWith(tsnodeDefinitionPrefix)
         )
@@ -73,9 +75,11 @@
   };
   // Splice into the allOf array at a spot that looks good.  Does not affect
   // behavior of the schema, but looks nicer if we want to submit as a PR to schemastore.
+// @ts-ignore
   mergedSchema.allOf = mergedSchema.allOf.filter(
     (item: any) => !item.$ref?.includes('tsNode')
   );
+// @ts-ignore
   mergedSchema.allOf.splice(mergedSchema.allOf.length - 1, 0, {
     $ref: '#/definitions/tsNodeDefinition',
   });