chore: add electron main script and config rollup

Skia
Nov 29, 2021, 5:35 PM
OYMRAJJVTJQZSOXGYWMLRE6OFCLGKFHAPCSSMG5ESQGL6JLUJ35AC

Dependencies

  • [2] M5P5UHKC chore: initial root configurations

Change contents

  • edit in "tsconfig.json" at line 16
    [2.378][2.378:405]()
    "declarationDir": "tmp",
  • replacement in "tsconfig.json" at line 19
    [2.499][2.499:543]()
    "declaration": true,
    "composite": true,
    [2.499]
    [2.543]
    "incremental": true,
  • replacement in "tsconfig.json" at line 31
    [2.748][2.748:809]()
    "include": ["packages/*/src/**/*", "packages/*/tests/**/*"]
    [2.748]
    [2.809]
    "include": ["packages/*/src/**/*", "packages/*/tests/**/*", "rollup.config.ts"]
  • file addition: rollup.config.ts (---r------)
    [1.0]
    /* eslint-disable node/no-unpublished-import */
    import commonjs from '@rollup/plugin-commonjs'
    import resolve from '@rollup/plugin-node-resolve'
    import { terser } from 'rollup-plugin-terser'
    import ts from '@rollup/plugin-typescript'
    import babel from '@rollup/plugin-babel'
    import builtins from 'builtin-modules'
    //import sourcemaps from 'rollup-plugin-sourcemaps'
    import jsonfile from '@rollup/plugin-json'
    import alias from '@rollup/plugin-alias'
    import { Plugin, RollupOptions, OutputOptions } from 'rollup'
    if (!process.env.NODE_ENV || process.env.NODE_ENV == '') {
    throw Error('"process.env.NODE_ENV" needs to be set when bundling with Rollup.')
    }
    function configurePlugins(rootDir: string): Plugin[] {
    if (process.env.NODE_ENV === 'production') {
    return [
    //sourcemaps(),
    alias({
    entries: [],
    }),
    resolve({
    rootDir,
    extensions: ['.mjs', '.js', '.json', '.jsx', '.node'],
    }),
    commonjs({
    sourceMap: true,
    }),
    jsonfile({}),
    ts(),
    babel({
    sourcemap: true,
    babelHelpers: 'bundled',
    plugins: [
    'babel-plugin-inferno',
    [
    'transform-inline-environment-variables',
    {
    include: ['NODE_ENV'],
    },
    ],
    'transform-remove-undefined',
    'transform-inline-consecutive-adds',
    'transform-property-literals',
    'transform-regexp-constructors',
    'minify-guarded-expressions',
    [
    'minify-dead-code-elimination',
    {
    keepFnName: true,
    /* eslint unicorn/prevent-abbreviations: "off" */
    keepFnArgs: true,
    keepClassName: true,
    tdz: true,
    },
    ],
    ],
    configFile: false,
    babelrc: false,
    }),
    terser({
    toplevel: true,
    ecma: 2020,
    parse: {
    shebang: true,
    },
    output: {
    comments: false,
    shebang: true,
    //preamble: formatLicense(),
    },
    }),
    ]
    } else {
    return [
    //sourcemaps(),
    alias({
    entries: [
    {
    find: 'inferno',
    replacement: __dirname + '/node_modules/inferno/dist/index.dev.esm.js',
    },
    ],
    }),
    resolve({
    rootDir,
    extensions: ['.mjs', '.js', '.json', '.jsx', '.node'],
    }),
    commonjs({
    sourceMap: true,
    }),
    jsonfile({}),
    ts(),
    babel({
    sourcemap: true,
    babelHelpers: 'bundled',
    plugins: [
    'babel-plugin-inferno',
    ['transform-inline-environment-variables', { include: ['NODE_ENV'] }],
    'transform-inline-consecutive-adds',
    [
    'minify-dead-code-elimination',
    {
    keepFnName: true,
    /* eslint unicorn/prevent-abbreviations: "off" */
    keepFnArgs: true,
    keepClassName: true,
    tdz: true,
    },
    ],
    ],
    configFile: false,
    babelrc: false,
    }),
    terser({
    ecma: 2020,
    keep_classnames: true,
    //keep_fnames: true,
    toplevel: true,
    parse: {
    shebang: true,
    },
    compress: {
    /* eslint unicorn/prevent-abbreviations: "off" */
    defaults: false,
    arrows: true,
    evaluate: true,
    properties: true,
    computed_props: true,
    dead_code: true,
    },
    output: {
    comments: 'some',
    shebang: true,
    beautify: true,
    semicolons: false,
    keep_quoted_props: true,
    indent_level: 2,
    max_line_len: 100,
    },
    }),
    ]
    }
    }
    function outputBundle(filename: string): OutputOptions {
    return {
    file: filename,
    format: 'es',
    sourcemap: true,
    }
    }
    const bundles: RollupOptions[] = [
    {
    input: 'packages/basic/src/main.ts',
    external: builtins.concat('electron'),
    plugins: configurePlugins('packages/basic'),
    output: {
    ...outputBundle('packages/dist/main.js'),
    format: 'cjs',
    },
    },
    ]
    export default bundles
  • edit in "pnpm-lock.yaml" at line 49
    [2.2556][2.2556:2595]()
    rollup-plugin-sourcemaps: ^0.6.3
  • edit in "pnpm-lock.yaml" at line 94
    [2.4567][2.4567:4638]()
    rollup-plugin-sourcemaps: 0.6.3_6a81cd64d5101efbbdec0e3858b03196
  • edit in "pnpm-lock.yaml" at line 98
    [2.4846]
    [2.4846]
    packages/basic:
    specifiers:
    electron: ^16.0.2
    dependencies:
    electron: 16.0.2
    packages/dist:
    specifiers:
    electron: ^16.0.2
    dependencies:
    electron: 16.0.2
  • edit in "pnpm-lock.yaml" at line 366
    [2.14121]
    [2.14121]
    /@electron/get/1.13.1:
    resolution: {integrity: sha512-U5vkXDZ9DwXtkPqlB45tfYnnYBN8PePp1z/XDCupnSpdrxT8/ThCv9WCwPLf9oqiSGZTkH6dx2jDUPuoXpjkcA==}
    engines: {node: '>=8.6'}
    dependencies:
    debug: 4.3.3
    env-paths: 2.2.1
    fs-extra: 8.1.0
    got: 9.6.0
    progress: 2.0.3
    semver: 6.3.0
    sumchecker: 3.0.1
    optionalDependencies:
    global-agent: 3.0.0
    global-tunnel-ng: 2.7.1
    transitivePeerDependencies:
    - supports-color
    dev: false
  • edit in "pnpm-lock.yaml" at line 559
    [2.19894]
    [2.19894]
    /@sindresorhus/is/0.14.0:
    resolution: {integrity: sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==}
    engines: {node: '>=6'}
    dev: false
    /@szmarczak/http-timer/1.1.2:
    resolution: {integrity: sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==}
    engines: {node: '>=6'}
    dependencies:
    defer-to-connect: 1.1.3
    dev: false
  • edit in "pnpm-lock.yaml" at line 605
    [2.21259]
    [2.21259]
    /@types/node/14.17.34:
    resolution: {integrity: sha512-USUftMYpmuMzeWobskoPfzDi+vkpe0dvcOBRNOscFrGxVp4jomnRxWuVohgqBow2xyIPC0S3gjxV/5079jhmDg==}
    dev: false
  • edit in "pnpm-lock.yaml" at line 1067
    [2.36480]
    [2.36480]
    /boolean/3.1.4:
    resolution: {integrity: sha512-3hx0kwU3uzG6ReQ3pnaFQPSktpBw6RHN3/ivDKEuU8g1XSfafowyvDnadjv1xp8IZqhtSukxlwv9bF6FhX8m0w==}
    dev: false
    optional: true
  • edit in "pnpm-lock.yaml" at line 1114
    [2.37816]
    [2.37816]
    /buffer-crc32/0.2.13:
    resolution: {integrity: sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=}
    dev: false
  • edit in "pnpm-lock.yaml" at line 1126
    [2.38096][2.38096:38110]()
    dev: true
  • edit in "pnpm-lock.yaml" at line 1146
    [2.38744]
    [2.38744]
    /cacheable-request/6.1.0:
    resolution: {integrity: sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==}
    engines: {node: '>=8'}
    dependencies:
    clone-response: 1.0.2
    get-stream: 5.2.0
    http-cache-semantics: 4.1.0
    keyv: 3.1.0
    lowercase-keys: 2.0.0
    normalize-url: 4.5.1
    responselike: 1.0.2
    dev: false
  • edit in "pnpm-lock.yaml" at line 1291
    [2.42821]
    [2.42821]
    /clone-response/1.0.2:
    resolution: {integrity: sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=}
    dependencies:
    mimic-response: 1.0.1
    dev: false
  • replacement in "pnpm-lock.yaml" at line 1426
    [2.46835][2.46835:46849]()
    dev: true
    [2.46835]
    [2.46849]
    /config-chain/1.1.13:
    resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==}
    dependencies:
    ini: 1.3.8
    proto-list: 1.2.4
    dev: false
    optional: true
  • edit in "pnpm-lock.yaml" at line 1461
    [2.47782][2.47782:47796]()
    dev: true
  • edit in "pnpm-lock.yaml" at line 1612
    [2.53229][2.53229:53243]()
    dev: true
  • edit in "pnpm-lock.yaml" at line 1629
    [2.53757][2.53757:53771]()
    dev: true
  • edit in "pnpm-lock.yaml" at line 1639
    [2.54041]
    [2.54041]
    /decompress-response/3.3.0:
    resolution: {integrity: sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=}
    engines: {node: '>=4'}
    dependencies:
    mimic-response: 1.0.1
    dev: false
  • edit in "pnpm-lock.yaml" at line 1667
    [2.54766]
    [2.54766]
    /defer-to-connect/1.1.3:
    resolution: {integrity: sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==}
    dev: false
  • edit in "pnpm-lock.yaml" at line 1677
    [2.54993][2.54993:55007]()
    dev: true
  • edit in "pnpm-lock.yaml" at line 1709
    [2.55901]
    [2.55901]
    /detect-node/2.1.0:
    resolution: {integrity: sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==}
    dev: false
    optional: true
  • edit in "pnpm-lock.yaml" at line 1768
    [2.57675]
    [2.57675]
    /duplexer3/0.1.4:
    resolution: {integrity: sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=}
    dev: false
  • edit in "pnpm-lock.yaml" at line 1791
    [2.58364]
    [2.58364]
    /electron/16.0.2:
    resolution: {integrity: sha512-kT746yVMztrP4BbT3nrFNcUcfgFu2yelUw6TWBVTy0pju+fBISaqcvoiMrq+8U0vRpoXSu2MJYygOf4T0Det7g==}
    engines: {node: '>= 8.6'}
    hasBin: true
    requiresBuild: true
    dependencies:
    '@electron/get': 1.13.1
    '@types/node': 14.17.34
    extract-zip: 1.7.0
    transitivePeerDependencies:
    - supports-color
    dev: false
    /encodeurl/1.0.2:
    resolution: {integrity: sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=}
    engines: {node: '>= 0.8'}
    dev: false
    optional: true
  • edit in "pnpm-lock.yaml" at line 1815
    [2.58550][2.58550:58564]()
    dev: true
  • edit in "pnpm-lock.yaml" at line 1830
    [2.59113]
    [2.59113]
    /env-paths/2.2.1:
    resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==}
    engines: {node: '>=6'}
    dev: false
  • edit in "pnpm-lock.yaml" at line 1858
    [2.59817]
    [2.59817]
    /es6-error/4.1.1:
    resolution: {integrity: sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==}
    dev: false
    optional: true
  • edit in "pnpm-lock.yaml" at line 1901
    [2.60989][2.60989:61003]()
    dev: true
  • edit in "pnpm-lock.yaml" at line 2184
    [2.69917]
    [2.69917]
    /extract-zip/1.7.0:
    resolution: {integrity: sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==}
    hasBin: true
    dependencies:
    concat-stream: 1.6.2
    debug: 2.6.9
    mkdirp: 0.5.5
    yauzl: 2.10.0
    dev: false
  • edit in "pnpm-lock.yaml" at line 2237
    [2.71319]
    [2.71319]
    /fd-slicer/1.1.0:
    resolution: {integrity: sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=}
    dependencies:
    pend: 1.2.0
    dev: false
  • edit in "pnpm-lock.yaml" at line 2363
    [2.74939]
    [2.74939]
    /fs-extra/8.1.0:
    resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==}
    engines: {node: '>=6 <7 || >=8'}
    dependencies:
    graceful-fs: 4.2.8
    jsonfile: 4.0.0
    universalify: 0.1.2
    dev: false
  • edit in "pnpm-lock.yaml" at line 2429
    [2.76822]
    [2.76822]
    /get-stream/4.1.0:
    resolution: {integrity: sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==}
    engines: {node: '>=6'}
    dependencies:
    pump: 3.0.0
    dev: false
    /get-stream/5.2.0:
    resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==}
    engines: {node: '>=8'}
    dependencies:
    pump: 3.0.0
    dev: false
  • edit in "pnpm-lock.yaml" at line 2509
    [2.78707]
    [2.78707]
    /global-agent/3.0.0:
    resolution: {integrity: sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==}
    engines: {node: '>=10.0'}
    requiresBuild: true
    dependencies:
    boolean: 3.1.4
    es6-error: 4.1.1
    matcher: 3.0.0
    roarr: 2.15.4
    semver: 7.3.5
    serialize-error: 7.0.1
    dev: false
    optional: true
  • edit in "pnpm-lock.yaml" at line 2543
    [2.79266]
    [2.79266]
    /global-tunnel-ng/2.7.1:
    resolution: {integrity: sha512-4s+DyciWBV0eK148wqXxcmVAbFVPqtc3sEtUE/GTQfuU80rySLcMhUmHKSHI7/LDj8q0gDYI1lIhRRB7ieRAqg==}
    engines: {node: '>=0.10'}
    requiresBuild: true
    dependencies:
    encodeurl: 1.0.2
    lodash: 4.17.21
    npm-conf: 1.1.3
    tunnel: 0.0.6
    dev: false
    optional: true
  • edit in "pnpm-lock.yaml" at line 2567
    [2.79682]
    [2.79682]
    /globalthis/1.0.2:
    resolution: {integrity: sha512-ZQnSFO1la8P7auIOQECnm0sSuoMeaSq0EEdXMBFF2QJO4uNcwbyhSgG3MruWNbFTqCLmxVwGOl7LZ9kASvHdeQ==}
    engines: {node: '>= 0.4'}
    dependencies:
    define-properties: 1.1.3
    dev: false
    optional: true
  • edit in "pnpm-lock.yaml" at line 2594
    [2.80242]
    [2.80242]
    /got/9.6.0:
    resolution: {integrity: sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==}
    engines: {node: '>=8.6'}
    dependencies:
    '@sindresorhus/is': 0.14.0
    '@szmarczak/http-timer': 1.1.2
    cacheable-request: 6.1.0
    decompress-response: 3.3.0
    duplexer3: 0.1.4
    get-stream: 4.1.0
    lowercase-keys: 1.0.1
    mimic-response: 1.0.1
    p-cancelable: 1.1.0
    to-readable-stream: 1.0.0
    url-parse-lax: 3.0.0
    dev: false
  • edit in "pnpm-lock.yaml" at line 2614
    [2.80390][2.80390:80404]()
    dev: true
  • edit in "pnpm-lock.yaml" at line 2822
    [2.86431]
    [2.86431]
    /http-cache-semantics/4.1.0:
    resolution: {integrity: sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==}
    dev: false
  • edit in "pnpm-lock.yaml" at line 2910
    [2.89235][2.89235:89249]()
    dev: true
  • edit in "pnpm-lock.yaml" at line 2913
    [2.89389][2.89389:89403]()
    dev: true
  • edit in "pnpm-lock.yaml" at line 3140
    [2.96652][2.96652:96666]()
    dev: true
  • edit in "pnpm-lock.yaml" at line 3187
    [2.98092]
    [2.98092]
    /json-buffer/3.0.0:
    resolution: {integrity: sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=}
    dev: false
  • edit in "pnpm-lock.yaml" at line 3202
    [2.98568]
    [2.98568]
    /json-stringify-safe/5.0.1:
    resolution: {integrity: sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=}
    dev: false
    optional: true
  • edit in "pnpm-lock.yaml" at line 3215
    [2.98808]
    [2.98808]
    /jsonfile/4.0.0:
    resolution: {integrity: sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=}
    optionalDependencies:
    graceful-fs: 4.2.8
    dev: false
  • edit in "pnpm-lock.yaml" at line 3225
    [2.98972]
    [2.98972]
    /keyv/3.1.0:
    resolution: {integrity: sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==}
    dependencies:
    json-buffer: 3.0.0
    dev: false
  • edit in "pnpm-lock.yaml" at line 3372
    [2.103163][2.103163:103177]()
    dev: true
  • edit in "pnpm-lock.yaml" at line 3385
    [2.103544]
    [2.103544]
    /lowercase-keys/1.0.1:
    resolution: {integrity: sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==}
    engines: {node: '>=0.10.0'}
    dev: false
  • edit in "pnpm-lock.yaml" at line 3391
    [2.103545]
    [2.103545]
    /lowercase-keys/2.0.0:
    resolution: {integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==}
    engines: {node: '>=8'}
    dev: false
  • edit in "pnpm-lock.yaml" at line 3401
    [2.103757][2.103757:103771]()
    dev: true
  • edit in "pnpm-lock.yaml" at line 3500
    [2.106856]
    [2.106856]
    /matcher/3.0.0:
    resolution: {integrity: sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==}
    engines: {node: '>=10'}
    dependencies:
    escape-string-regexp: 4.0.0
    dev: false
    optional: true
  • edit in "pnpm-lock.yaml" at line 3574
    [2.108840]
    [2.108840]
    /mimic-response/1.0.1:
    resolution: {integrity: sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==}
    engines: {node: '>=4'}
    dev: false
  • edit in "pnpm-lock.yaml" at line 3592
    [2.109380][2.109380:109394]()
    dev: true
  • edit in "pnpm-lock.yaml" at line 3600
    [2.109652]
    [2.109652]
    /mkdirp/0.5.5:
    resolution: {integrity: sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==}
    hasBin: true
    dependencies:
    minimist: 1.2.5
    dev: false
  • edit in "pnpm-lock.yaml" at line 3610
    [2.109729][2.109729:109743]()
    dev: true
  • edit in "pnpm-lock.yaml" at line 3613
    [2.109882][2.109882:109896]()
    dev: true
  • edit in "pnpm-lock.yaml" at line 3712
    [2.113084]
    [2.113084]
    /normalize-url/4.5.1:
    resolution: {integrity: sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==}
    engines: {node: '>=8'}
    dev: false
  • edit in "pnpm-lock.yaml" at line 3728
    [2.113506]
    [2.113506]
    /npm-conf/1.1.3:
    resolution: {integrity: sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==}
    engines: {node: '>=4'}
    dependencies:
    config-chain: 1.1.13
    pify: 3.0.0
    dev: false
    optional: true
  • edit in "pnpm-lock.yaml" at line 3766
    [2.114381][2.114381:114395]()
    dev: true
  • edit in "pnpm-lock.yaml" at line 3821
    [2.115816][2.115816:115830]()
    dev: true
  • edit in "pnpm-lock.yaml" at line 3856
    [2.116887]
    [2.116887]
    /p-cancelable/1.1.0:
    resolution: {integrity: sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==}
    engines: {node: '>=6'}
    dev: false
  • edit in "pnpm-lock.yaml" at line 3999
    [2.121053]
    [2.121053]
    /pend/1.2.0:
    resolution: {integrity: sha1-elfrVQpng/kRUzH89GY9XI4AelA=}
    dev: false
  • edit in "pnpm-lock.yaml" at line 4020
    [2.121688]
    [2.121688]
    /pify/3.0.0:
    resolution: {integrity: sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=}
    engines: {node: '>=4'}
    dev: false
    optional: true
  • edit in "pnpm-lock.yaml" at line 4435
    [2.135297]
    [2.135297]
    /prepend-http/2.0.0:
    resolution: {integrity: sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=}
    engines: {node: '>=4'}
    dev: false
  • edit in "pnpm-lock.yaml" at line 4454
    [2.135795][2.135795:135809]()
    dev: true
  • replacement in "pnpm-lock.yaml" at line 4458
    [2.135985][2.135985:135999]()
    dev: true
    [2.135985]
    [2.135999]
    /proto-list/1.2.4:
    resolution: {integrity: sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=}
    dev: false
    optional: true
  • edit in "pnpm-lock.yaml" at line 4475
    [2.136328]
    [2.136328]
    /pump/3.0.0:
    resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==}
    dependencies:
    end-of-stream: 1.4.4
    once: 1.4.0
    dev: false
  • edit in "pnpm-lock.yaml" at line 4552
    [2.138510][2.138510:138524]()
    dev: true
  • edit in "pnpm-lock.yaml" at line 4696
    [2.143002]
    [2.143002]
    /responselike/1.0.2:
    resolution: {integrity: sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=}
    dependencies:
    lowercase-keys: 1.0.1
    dev: false
  • replacement in "pnpm-lock.yaml" at line 4720
    [2.143605][2.143605:143979]()
    /rollup-plugin-sourcemaps/0.6.3_6a81cd64d5101efbbdec0e3858b03196:
    resolution: {integrity: sha512-paFu+nT1xvuO1tPFYXGe+XnQvg4Hjqv/eIhG8i5EspfYYPBKL57X7iVbfv55aNVASg3dzWvES9dmWsL2KhfByw==}
    engines: {node: '>=10.0.0'}
    peerDependencies:
    '@types/node': '>=10.0.0'
    rollup: '>=0.31.2'
    peerDependenciesMeta:
    '@types/node':
    optional: true
    [2.143605]
    [2.143979]
    /roarr/2.15.4:
    resolution: {integrity: sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==}
    engines: {node: '>=8.0'}
  • replacement in "pnpm-lock.yaml" at line 4724
    [2.143997][2.143997:144143]()
    '@rollup/pluginutils': 3.1.0_rollup@2.60.1
    '@types/node': 16.11.10
    rollup: 2.60.1
    source-map-resolve: 0.6.0
    dev: true
    [2.143997]
    [2.144143]
    boolean: 3.1.4
    detect-node: 2.1.0
    globalthis: 1.0.2
    json-stringify-safe: 5.0.1
    semver-compare: 1.0.0
    sprintf-js: 1.1.2
    dev: false
    optional: true
  • edit in "pnpm-lock.yaml" at line 4763
    [2.145184][2.145184:145198]()
    dev: true
  • edit in "pnpm-lock.yaml" at line 4790
    [2.146056]
    [2.146056]
    /semver-compare/1.0.0:
    resolution: {integrity: sha1-De4hahyUGrN+nvsXiPavxf9VN/w=}
    dev: false
    optional: true
  • edit in "pnpm-lock.yaml" at line 4810
    [2.146583][2.146583:146597]()
    dev: true
  • replacement in "pnpm-lock.yaml" at line 4817
    [2.146826][2.146826:146840]()
    dev: true
    [2.146826]
    [2.146840]
    /serialize-error/7.0.1:
    resolution: {integrity: sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==}
    engines: {node: '>=10'}
    dependencies:
    type-fest: 0.13.1
    dev: false
    optional: true
  • edit in "pnpm-lock.yaml" at line 4979
    [2.152111]
    [2.152111]
    /sprintf-js/1.1.2:
    resolution: {integrity: sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==}
    dev: false
    optional: true
  • edit in "pnpm-lock.yaml" at line 5021
    [2.153335][2.153335:153349]()
    dev: true
  • edit in "pnpm-lock.yaml" at line 5076
    [2.155060]
    [2.155060]
    /sumchecker/3.0.1:
    resolution: {integrity: sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==}
    engines: {node: '>= 8.0'}
    dependencies:
    debug: 4.3.3
    transitivePeerDependencies:
    - supports-color
    dev: false
  • edit in "pnpm-lock.yaml" at line 5230
    [2.159192]
    [2.159192]
    /to-readable-stream/1.0.0:
    resolution: {integrity: sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==}
    engines: {node: '>=6'}
    dev: false
  • edit in "pnpm-lock.yaml" at line 5316
    [2.161716]
    [2.161716]
    /tunnel/0.0.6:
    resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==}
    engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'}
    dev: false
    optional: true
  • edit in "pnpm-lock.yaml" at line 5328
    [2.161950]
    [2.161950]
    /type-fest/0.13.1:
    resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==}
    engines: {node: '>=10'}
    dev: false
    optional: true
  • edit in "pnpm-lock.yaml" at line 5360
    [2.162908][2.162908:162922]()
    dev: true
  • edit in "pnpm-lock.yaml" at line 5425
    [2.165076]
    [2.165076]
    /universalify/0.1.2:
    resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==}
    engines: {node: '>= 4.0.0'}
    dev: false
  • edit in "pnpm-lock.yaml" at line 5454
    [2.165813]
    [2.165813]
    /url-parse-lax/3.0.0:
    resolution: {integrity: sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=}
    engines: {node: '>=4'}
    dependencies:
    prepend-http: 2.0.0
    dev: false
  • edit in "pnpm-lock.yaml" at line 5469
    [2.166088][2.166088:166102]()
    dev: true
  • edit in "pnpm-lock.yaml" at line 5581
    [2.169437][2.169437:169451]()
    dev: true
  • edit in "pnpm-lock.yaml" at line 5593
    [2.169935][2.169935:169949]()
    dev: true
  • edit in "pnpm-lock.yaml" at line 5628
    [2.170964]
    [2.170964]
    /yauzl/2.10.0:
    resolution: {integrity: sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=}
    dependencies:
    buffer-crc32: 0.2.13
    fd-slicer: 1.1.0
    dev: false
  • file addition: packages (d--r------)
    [1.0]
  • file addition: dist (d--r------)
    [0.16169]
  • file addition: package.json (---r------)
    [0.16186]
    {
    "description": "Manages packaging the distibuted packages.",
    "private": true,
    "author": "James Adam Armstrong",
    "license": "ISC",
    "scripts": {},
    "dependencies": {
    "electron": "^16.0.2"
    },
    "engines": {
    "node": ">=16.9.0 <17"
    },
    "type": "commonjs",
    "main": "main.js"
    }
  • file addition: basic (d--r------)
    [0.16169]
  • file addition: src (d--r------)
    [0.16527]
  • file addition: main.ts (---r------)
    [0.16543]
    /*
    ISC License (ISC)
    Copyright 2021 James Adam Armstrong
    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted, provided that the above copyright
    notice and this permission notice appear in all copies.
    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
    FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    PERFORMANCE OF THIS SOFTWARE.
    */
    import { app, BrowserWindow } from 'electron'
    import path from 'path'
    import fs from 'fs'
    interface Setup {
    title: string
    icon: string
    index: string
    }
    const defaultSetup: Readonly<Setup> = {
    title: 'LOL Calculator',
    icon: 'icon.png',
    index: 'index.html',
    }
    function load(name: string): Readonly<Setup> {
    try {
    const raw = fs.readFileSync(path.join(__dirname, name))
    const data = JSON.parse(raw.toString())
    if (typeof data === 'object') {
    const setup = { ...defaultSetup }
    for (const key in defaultSetup) {
    const value = data[key]
    if (typeof value === 'string') {
    setup[key] = value
    }
    }
    return setup
    } else {
    return defaultSetup
    }
    } catch (_error) {
    return defaultSetup
    }
    }
    function createWindow(name?: string): void {
    const { title, icon, index } = name ? load(name) : defaultSetup
    const mainWindow = new BrowserWindow({
    width: 800,
    height: 600,
    icon,
    title,
    webPreferences: {
    // preload: path.join(__dirname, 'preload.js'),
    devTools: process.env.NODE_ENV != 'production',
    },
    })
    mainWindow.menuBarVisible = false
    mainWindow.loadFile(index).then(() => mainWindow.maximize())
    }
    app.whenReady().then(() => {
    createWindow()
    // On macOS it's common to re-create a window in the app when the
    // dock icon is clicked and there are no other windows open.
    if (process.platform === 'darwin') {
    app.on('activate', () => {
    if (BrowserWindow.getAllWindows().length === 0) createWindow()
    })
    }
    })
    // Quit when all windows are closed, except on macOS. There, it's common
    // for applications and their menu bar to stay active until the user quits
    // explicitly with Cmd + Q.
    app.on('window-all-closed', () => {
    if (process.platform !== 'darwin') {
    app.quit()
    }
    })
  • file addition: package.json (---r------)
    [0.16527]
    {
    "description": "Basic calculator for League of Legends.",
    "private": true,
    "author": "James Adam Armstrong",
    "license": "ISC",
    "scripts": {},
    "dependencies": {
    "electron": "^16.0.2"
    },
    "engines": {
    "node": ">=16.9.0 <17"
    }
    }
  • edit in "package.json" at line 48
    [2.172872][2.172872:172912]()
    "rollup-plugin-sourcemaps": "^0.6.3",