@anmiles/google-api-wrapper 18.0.3 → 19.0.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.
Files changed (108) hide show
  1. package/.nycrc.json +27 -0
  2. package/CHANGELOG.md +32 -21
  3. package/README.md +1 -1
  4. package/cspell.json +22 -0
  5. package/dist/index.d.ts +3 -2
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +4 -3
  8. package/dist/index.js.map +1 -1
  9. package/dist/lib/api.d.ts +5 -11
  10. package/dist/lib/api.d.ts.map +1 -1
  11. package/dist/lib/api.js +5 -6
  12. package/dist/lib/api.js.map +1 -1
  13. package/dist/lib/auth.d.ts +2 -9
  14. package/dist/lib/auth.d.ts.map +1 -1
  15. package/dist/lib/auth.js +3 -23
  16. package/dist/lib/auth.js.map +1 -1
  17. package/dist/lib/credentials/generator.d.ts +4 -0
  18. package/dist/lib/credentials/generator.d.ts.map +1 -0
  19. package/dist/lib/credentials/generator.js +60 -0
  20. package/dist/lib/credentials/generator.js.map +1 -0
  21. package/dist/lib/credentials/index.d.ts +5 -0
  22. package/dist/lib/credentials/index.d.ts.map +1 -0
  23. package/dist/lib/credentials/index.js +42 -0
  24. package/dist/lib/credentials/index.js.map +1 -0
  25. package/dist/lib/credentials/validator.d.ts +7 -0
  26. package/dist/lib/credentials/validator.d.ts.map +1 -0
  27. package/dist/lib/credentials/validator.js +20 -0
  28. package/dist/lib/credentials/validator.js.map +1 -0
  29. package/dist/lib/login.d.ts +3 -0
  30. package/dist/lib/login.d.ts.map +1 -0
  31. package/dist/lib/login.js +19 -0
  32. package/dist/lib/login.js.map +1 -0
  33. package/dist/lib/profiles.d.ts +4 -12
  34. package/dist/lib/profiles.d.ts.map +1 -1
  35. package/dist/lib/profiles.js +8 -11
  36. package/dist/lib/profiles.js.map +1 -1
  37. package/dist/lib/renderer.d.ts +7 -25
  38. package/dist/lib/renderer.d.ts.map +1 -1
  39. package/dist/lib/renderer.js +26 -23
  40. package/dist/lib/renderer.js.map +1 -1
  41. package/dist/lib/scopes.d.ts +2 -0
  42. package/dist/lib/scopes.d.ts.map +1 -0
  43. package/dist/lib/scopes.js +22 -0
  44. package/dist/lib/scopes.js.map +1 -0
  45. package/dist/lib/secrets.d.ts +2 -28
  46. package/dist/lib/secrets.d.ts.map +1 -1
  47. package/dist/lib/secrets.js +15 -115
  48. package/dist/lib/secrets.js.map +1 -1
  49. package/dist/lib/utils/paths.d.ts +7 -0
  50. package/dist/lib/utils/paths.d.ts.map +1 -0
  51. package/dist/lib/{paths.js → utils/paths.js} +6 -8
  52. package/dist/lib/utils/paths.js.map +1 -0
  53. package/dist/templates/auth.html +1 -1
  54. package/dist/templates/index.html +6 -1
  55. package/dist/templates/page.html +1 -2
  56. package/dist/templates/script.html +0 -0
  57. package/{src/templates/css.html → dist/templates/style.html} +2 -2
  58. package/dist/types/options.d.ts +2 -3
  59. package/dist/types/options.d.ts.map +1 -1
  60. package/dist/types/secrets.d.ts +1 -2
  61. package/dist/types/secrets.d.ts.map +1 -1
  62. package/eslint.config.mts +43 -0
  63. package/jest.config.js +9 -9
  64. package/package.json +40 -30
  65. package/src/index.ts +3 -2
  66. package/src/lib/__tests__/__snapshots__/renderer.test.ts.snap +273 -0
  67. package/src/lib/__tests__/__snapshots__/scopes.test.ts.snap +6 -0
  68. package/src/lib/__tests__/__snapshots__/secrets.test.ts.snap +38 -0
  69. package/src/lib/__tests__/api.test.ts +72 -74
  70. package/src/lib/__tests__/auth.test.ts +38 -114
  71. package/src/lib/__tests__/login.test.ts +71 -0
  72. package/src/lib/__tests__/profiles.test.ts +50 -93
  73. package/src/lib/__tests__/renderer.test.ts +16 -89
  74. package/src/lib/__tests__/scopes.test.ts +41 -0
  75. package/src/lib/__tests__/secrets.test.ts +47 -541
  76. package/src/lib/api.ts +19 -21
  77. package/src/lib/auth.ts +5 -25
  78. package/src/lib/credentials/__tests__/generator.test.ts +249 -0
  79. package/src/lib/credentials/__tests__/index.test.ts +213 -0
  80. package/src/lib/credentials/__tests__/validator.test.ts +43 -0
  81. package/src/lib/credentials/generator.ts +70 -0
  82. package/src/lib/credentials/index.ts +50 -0
  83. package/src/lib/credentials/validator.ts +29 -0
  84. package/src/lib/login.ts +22 -0
  85. package/src/lib/profiles.ts +9 -12
  86. package/src/lib/renderer.ts +32 -27
  87. package/src/lib/scopes.ts +18 -0
  88. package/src/lib/secrets.ts +21 -141
  89. package/src/lib/utils/paths.ts +30 -0
  90. package/src/templates/auth.html +1 -1
  91. package/src/templates/index.html +6 -1
  92. package/src/templates/page.html +1 -2
  93. package/src/templates/script.html +0 -0
  94. package/{dist/templates/css.html → src/templates/style.html} +2 -2
  95. package/src/types/options.ts +5 -7
  96. package/src/types/secrets.ts +8 -10
  97. package/tsconfig.build.json +6 -0
  98. package/tsconfig.json +0 -5
  99. package/tsconfig.test.json +1 -1
  100. package/.eslintignore +0 -2
  101. package/.eslintrc.js +0 -30
  102. package/.vscode/settings.json +0 -9
  103. package/coverage.config.js +0 -8
  104. package/dist/lib/paths.d.ts +0 -16
  105. package/dist/lib/paths.d.ts.map +0 -1
  106. package/dist/lib/paths.js.map +0 -1
  107. package/src/lib/__tests__/paths.test.ts +0 -77
  108. package/src/lib/paths.ts +0 -32
@@ -3,35 +3,34 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.filterProfiles = exports.createProfile = exports.setProfiles = exports.getProfiles = void 0;
6
+ exports.getProfiles = getProfiles;
7
+ exports.setProfiles = setProfiles;
8
+ exports.createProfile = createProfile;
9
+ exports.filterProfiles = filterProfiles;
7
10
  const fs_1 = __importDefault(require("fs"));
8
11
  require("@anmiles/prototypes");
9
- const paths_1 = require("./paths");
10
- const profiles_1 = __importDefault(require("./profiles"));
12
+ const paths_1 = require("./utils/paths");
11
13
  function getProfiles() {
12
14
  const profilesFile = (0, paths_1.getProfilesFile)();
13
15
  return fs_1.default.getJSON(profilesFile, () => []);
14
16
  }
15
- exports.getProfiles = getProfiles;
16
17
  function setProfiles(profiles) {
17
18
  const profilesFile = (0, paths_1.getProfilesFile)();
18
19
  fs_1.default.writeJSON(profilesFile, profiles);
19
20
  }
20
- exports.setProfiles = setProfiles;
21
21
  function createProfile(profile) {
22
22
  if (!profile) {
23
23
  throw new Error('Usage: `npm run create <profile>` where `profile` - is any profile name you want');
24
24
  }
25
- const existingProfiles = profiles_1.default.getProfiles();
25
+ const existingProfiles = getProfiles();
26
26
  if (existingProfiles.includes(profile)) {
27
27
  return;
28
28
  }
29
29
  existingProfiles.push(profile);
30
- profiles_1.default.setProfiles(existingProfiles);
30
+ setProfiles(existingProfiles);
31
31
  }
32
- exports.createProfile = createProfile;
33
32
  function filterProfiles(profile) {
34
- const existingProfiles = profiles_1.default.getProfiles();
33
+ const existingProfiles = getProfiles();
35
34
  if (existingProfiles.length === 0) {
36
35
  throw new Error('Please `npm run create` at least one profile');
37
36
  }
@@ -43,6 +42,4 @@ function filterProfiles(profile) {
43
42
  }
44
43
  throw new Error(`Profile '${profile}' does not exist`);
45
44
  }
46
- exports.filterProfiles = filterProfiles;
47
- exports.default = { getProfiles, setProfiles, createProfile, filterProfiles };
48
45
  //# sourceMappingURL=profiles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../src/lib/profiles.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,+BAA6B;AAC7B,mCAA0C;AAE1C,0DAAkC;AAElC,SAAS,WAAW;IACnB,MAAM,YAAY,GAAG,IAAA,uBAAe,GAAE,CAAC;IACvC,OAAO,YAAE,CAAC,OAAO,CAAC,YAAY,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;AAC3C,CAAC;AAwCQ,kCAAW;AAtCpB,SAAS,WAAW,CAAC,QAAkB;IACtC,MAAM,YAAY,GAAG,IAAA,uBAAe,GAAE,CAAC;IACvC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SAAgB,WAAW;IAC1B,MAAM,YAAY,GAAG,IAAA,uBAAe,GAAE,CAAC;IACvC,OAAO,YAAE,CAAC,OAAO,CAAC,YAAY,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;AAC3C,CAAC;AAED,SAAgB,WAAW,CAAC,QAAkB;IAC7C,MAAM,YAAY,GAAG,IAAA,uBAAe,GAAE,CAAC;IACvC,YAAE,CAAC,SAAS,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;AACtC,CAAC;AAED,SAAgB,aAAa,CAAC,OAAgB;IAC7C,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,kFAAkF,CAAC,CAAC;IACrG,CAAC;IAED,MAAM,gBAAgB,GAAG,WAAW,EAAE,CAAC;IAEvC,IAAI,gBAAgB,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACxC,OAAO;IACR,CAAC;IAED,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/B,WAAW,CAAC,gBAAgB,CAAC,CAAC;AAC/B,CAAC;AAED,SAAgB,cAAc,CAAC,OAAgB;IAC9C,MAAM,gBAAgB,GAAG,WAAW,EAAE,CAAC;IAEvC,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;IACjE,CAAC;IAED,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,OAAO,gBAAgB,CAAC;IACzB,CAAC;IAED,IAAI,gBAAgB,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACxC,OAAO,CAAE,OAAO,CAAE,CAAC;IACpB,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,YAAY,OAAO,kBAAkB,CAAC,CAAC;AACxD,CAAC"}
@@ -1,36 +1,18 @@
1
- declare const templates: {
2
- readonly index: readonly ["page"];
3
- readonly page: readonly ["css", "content"];
4
- readonly css: readonly [];
1
+ export declare const templates: {
2
+ readonly index: readonly ["style", "page", "script"];
3
+ readonly page: readonly ["content"];
4
+ readonly style: readonly [];
5
+ readonly script: readonly [];
5
6
  readonly auth: readonly ["profile", "authUrl", "scopesList"];
6
7
  readonly scope: readonly ["type", "title", "name"];
7
8
  readonly done: readonly ["profile"];
8
9
  };
9
- type TemplateName = keyof typeof templates;
10
- declare function renderAuth({ profile, authUrl, scope }: {
10
+ export declare function renderAuth({ profile, authUrl, scope }: {
11
11
  profile: string;
12
12
  authUrl: string;
13
13
  scope: string[];
14
14
  }): string;
15
- declare function renderDone({ profile }: {
15
+ export declare function renderDone({ profile }: {
16
16
  profile: string;
17
17
  }): string;
18
- declare function render<T extends TemplateName>(templateName: T, values: Record<typeof templates[T][number], string | undefined>): string;
19
- declare function getTemplate(templateName: TemplateName): string;
20
- export { templates, renderAuth, renderDone };
21
- declare const _default: {
22
- templates: {
23
- readonly index: readonly ["page"];
24
- readonly page: readonly ["css", "content"];
25
- readonly css: readonly [];
26
- readonly auth: readonly ["profile", "authUrl", "scopesList"];
27
- readonly scope: readonly ["type", "title", "name"];
28
- readonly done: readonly ["profile"];
29
- };
30
- render: typeof render;
31
- getTemplate: typeof getTemplate;
32
- renderAuth: typeof renderAuth;
33
- renderDone: typeof renderDone;
34
- };
35
- export default _default;
36
18
  //# sourceMappingURL=renderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/lib/renderer.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,SAAS;;;;;;;CAOL,CAAC;AAEX,KAAK,YAAY,GAAG,MAAM,OAAO,SAAS,CAAC;AAI3C,iBAAS,UAAU,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;IAAE,OAAO,EAAG,MAAM,CAAC;IAAC,OAAO,EAAG,MAAM,CAAC;IAAC,KAAK,EAAG,MAAM,EAAE,CAAA;CAAE,GAAG,MAAM,CAWjH;AAED,iBAAS,UAAU,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAG,MAAM,CAAA;CAAE,GAAG,MAAM,CAK7D;AAGD,iBAAS,MAAM,CAAC,CAAC,SAAS,YAAY,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,MAAM,CAUhI;AAED,iBAAS,WAAW,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM,CAQvD;AAED,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;;;;;;;;;;;;;;;AAC7C,wBAA0E"}
1
+ {"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/lib/renderer.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS;;;;;;;;CAQZ,CAAC;AAMX,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,MAAM,CAYrH;AAED,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAMnE"}
@@ -3,56 +3,59 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.renderDone = exports.renderAuth = exports.templates = void 0;
6
+ exports.templates = void 0;
7
+ exports.renderAuth = renderAuth;
8
+ exports.renderDone = renderDone;
7
9
  const fs_1 = __importDefault(require("fs"));
8
- const renderer_1 = __importDefault(require("./renderer"));
9
- const paths_1 = require("./paths");
10
- const templates = {
11
- index: ['page'],
12
- page: ['css', 'content'],
13
- css: [],
10
+ const paths_1 = require("./utils/paths");
11
+ exports.templates = {
12
+ index: ['style', 'page', 'script'],
13
+ page: ['content'],
14
+ style: [],
15
+ script: [],
14
16
  auth: ['profile', 'authUrl', 'scopesList'],
15
17
  scope: ['type', 'title', 'name'],
16
18
  done: ['profile'],
17
19
  };
18
- exports.templates = templates;
19
- const allHTML = {};
20
+ const allHTML = {}; // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion
20
21
  function renderAuth({ profile, authUrl, scope }) {
21
22
  const scopesList = scope.map((s) => render('scope', {
22
23
  name: s.split('/').pop(),
23
24
  title: s.endsWith('.readonly') ? 'Readonly (cannot change or delete your data)' : 'Writable (can change or delete your data)',
24
25
  type: s.endsWith('.readonly') ? 'readonly' : '',
25
26
  })).join('\n');
26
- const css = render('css', {});
27
+ const style = render('style', {});
28
+ const script = render('script', {});
27
29
  const content = render('auth', { profile, authUrl, scopesList });
28
- const page = render('page', { css, content });
29
- return render('index', { page });
30
+ const page = render('page', { content });
31
+ return render('index', { style, page, script });
30
32
  }
31
- exports.renderAuth = renderAuth;
32
33
  function renderDone({ profile }) {
33
- const css = render('css', {});
34
+ const style = render('style', {});
35
+ const script = render('script', {});
34
36
  const content = render('done', { profile });
35
- const page = render('page', { css, content });
36
- return render('index', { page });
37
+ const page = render('page', { content });
38
+ return render('index', { style, page, script });
37
39
  }
38
- exports.renderDone = renderDone;
39
40
  // TODO: Use react
40
41
  function render(templateName, values) {
41
- let html = renderer_1.default.getTemplate(templateName);
42
+ let html = getTemplate(templateName);
42
43
  const allValues = values;
43
- for (const variable of templates[templateName]) {
44
- const value = allValues[variable] ?? '';
45
- html = html.replace(`\${${variable}}`, value);
44
+ for (const variable of exports.templates[templateName]) {
45
+ const value = allValues[variable];
46
+ if (typeof value === 'undefined') {
47
+ throw new Error(`Missing required value '${variable}' while rendering template '${templateName}'`);
48
+ }
49
+ html = html.replaceAll(`\${${variable}}`, value);
46
50
  }
47
51
  return html;
48
52
  }
49
53
  function getTemplate(templateName) {
50
54
  if (!(templateName in allHTML)) {
51
55
  const file = (0, paths_1.getTemplateFile)(templateName);
52
- const template = fs_1.default.readFileSync(file).toString();
56
+ const template = fs_1.default.readFileSync(file).toString().trim();
53
57
  allHTML[templateName] = template;
54
58
  }
55
59
  return allHTML[templateName];
56
60
  }
57
- exports.default = { templates, render, getTemplate, renderAuth, renderDone };
58
61
  //# sourceMappingURL=renderer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderer.js","sourceRoot":"","sources":["../../src/lib/renderer.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,0DAAkC;AAClC,mCAA0C;AAE1C,MAAM,SAAS,GAAG;IACjB,KAAK,EAAG,CAAE,MAAM,CAAW;IAC3B,IAAI,EAAI,CAAE,KAAK,EAAE,SAAS,CAAW;IACrC,GAAG,EAAK,EAAY;IACpB,IAAI,EAAI,CAAE,SAAS,EAAE,SAAS,EAAE,YAAY,CAAE;IAC9C,KAAK,EAAG,CAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAW;IAC5C,IAAI,EAAI,CAAE,SAAS,CAAW;CACrB,CAAC;AAiDF,8BAAS;AA7ClB,MAAM,OAAO,GAAG,EAAkC,CAAC;AAEnD,SAAS,UAAU,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAA4D;IACxG,MAAM,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE;QACnD,IAAI,EAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAG;QAC3B,KAAK,EAAG,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,8CAA8C,CAAC,CAAC,CAAC,2CAA2C;QAC9H,IAAI,EAAI,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;KACjD,CAAC,CAAC,CAAC,IAAI,CAA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AAQ,IAAI,iBAAS,CAAC,YAAY,CAAC,EAAE,CAAC;QAChD,MAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;QAElC,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,2BAA2B,QAAQ,+BAA+B,YAAY,GAAG,CAAC,CAAC;QACpG,CAAC;QAED,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,QAAQ,GAAG,EAAE,KAAK,CAAC,CAAC;IAClD,CAAC;IAED,OAAO,IAAI,CAAC;AACb,CAAC;AAED,SAAS,WAAW,CAAC,YAA0B;IAC9C,IAAI,CAAC,CAAC,YAAY,IAAI,OAAO,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,GAAc,IAAA,uBAAe,EAAC,YAAY,CAAC,CAAC;QACtD,MAAM,QAAQ,GAAU,YAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC;QAChE,OAAO,CAAC,YAAY,CAAC,GAAG,QAAQ,CAAC;IAClC,CAAC;IAED,OAAO,OAAO,CAAC,YAAY,CAAC,CAAC;AAC9B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function getScopes(): string[];
2
+ //# sourceMappingURL=scopes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../../src/lib/scopes.ts"],"names":[],"mappings":"AAIA,wBAAgB,SAAS,IAAI,MAAM,EAAE,CAMpC"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getScopes = getScopes;
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const paths_1 = require("./utils/paths");
9
+ function getScopes() {
10
+ const scopesFile = (0, paths_1.getScopesFile)();
11
+ const scopes = fs_1.default.getJSON(scopesFile, () => {
12
+ throw new Error(getScopesError(scopesFile));
13
+ });
14
+ return scopes;
15
+ }
16
+ function getScopesError(scopesFile) {
17
+ return [
18
+ `File ${scopesFile} not found!`,
19
+ `This application had to have pre-defined file ${scopesFile} that will declare needed scopes`,
20
+ ].join('\n');
21
+ }
22
+ //# sourceMappingURL=scopes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scopes.js","sourceRoot":"","sources":["../../src/lib/scopes.ts"],"names":[],"mappings":";;;;;AAIA,8BAMC;AAVD,4CAAoB;AAEpB,yCAA8C;AAE9C,SAAgB,SAAS;IACxB,MAAM,UAAU,GAAG,IAAA,qBAAa,GAAE,CAAC;IACnC,MAAM,MAAM,GAAO,YAAE,CAAC,OAAO,CAAW,UAAU,EAAE,GAAG,EAAE;QACxD,MAAM,IAAI,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AACf,CAAC;AAED,SAAS,cAAc,CAAC,UAAkB;IACzC,OAAO;QACN,QAAQ,UAAU,aAAa;QAC/B,iDAAiD,UAAU,kCAAkC;KAC7F,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACd,CAAC"}
@@ -1,30 +1,4 @@
1
- import type GoogleApis from 'googleapis';
2
- import type { Secrets } from '../types/secrets';
3
- import type { AuthOptions } from '../types/options';
4
1
  import '@anmiles/prototypes';
5
- declare function getScopes(): string[];
6
- declare function getSecrets(profile: string): Secrets;
7
- declare function getCredentials(profile: string, auth: GoogleApis.Common.OAuth2Client, options?: AuthOptions): Promise<GoogleApis.Auth.Credentials>;
8
- declare function validateCredentials(credentials: GoogleApis.Auth.Credentials): Promise<{
9
- isValid: boolean;
10
- validationError?: string;
11
- }>;
12
- declare function createCredentials(profile: string, auth: GoogleApis.Auth.OAuth2Client, options?: AuthOptions, prompt?: GoogleApis.Auth.GenerateAuthUrlOpts['prompt']): Promise<GoogleApis.Auth.Credentials>;
13
- declare function deleteCredentials(profile: string): void;
14
- declare function checkSecrets(profile: string, secretsObject: Secrets, secretsFile: string): true;
15
- declare function getScopesError(scopesFile: string): string;
16
- declare function getSecretsError(profile: string, secretsFile: string): string;
17
- export { getSecrets, getCredentials, deleteCredentials };
18
- declare const _default: {
19
- getScopes: typeof getScopes;
20
- getSecrets: typeof getSecrets;
21
- getCredentials: typeof getCredentials;
22
- validateCredentials: typeof validateCredentials;
23
- createCredentials: typeof createCredentials;
24
- deleteCredentials: typeof deleteCredentials;
25
- checkSecrets: typeof checkSecrets;
26
- getSecretsError: typeof getSecretsError;
27
- getScopesError: typeof getScopesError;
28
- };
29
- export default _default;
2
+ import type { Secrets } from '../types/secrets';
3
+ export declare function getSecrets(profile: string): Secrets;
30
4
  //# sourceMappingURL=secrets.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../../src/lib/secrets.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC;AAEzC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,qBAAqB,CAAC;AAa7B,iBAAS,SAAS,IAAI,MAAM,EAAE,CAM7B;AAED,iBAAS,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAO5C;AAED,iBAAe,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAYhJ;AAGD,iBAAe,mBAAmB,CAAC,WAAW,EAAE,UAAU,CAAC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC;IAAE,OAAO,EAAG,OAAO,CAAC;IAAC,eAAe,CAAC,EAAG,MAAM,CAAA;CAAE,CAAC,CAkBtI;AAED,iBAAe,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAmDzM;AAED,iBAAS,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAMhD;AAED,iBAAS,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAKxF;AAED,iBAAS,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAKlD;AAED,iBAAS,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAmCrE;AAED,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC;;;;;;;;;;;;AACzD,wBAAmK"}
1
+ {"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../../src/lib/secrets.ts"],"names":[],"mappings":"AAEA,OAAO,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAgBhD,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAOnD"}
@@ -3,131 +3,32 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.deleteCredentials = exports.getCredentials = exports.getSecrets = void 0;
6
+ exports.getSecrets = getSecrets;
7
7
  const fs_1 = __importDefault(require("fs"));
8
- const http_1 = __importDefault(require("http"));
9
- const out_url_1 = require("out-url");
10
- const server_destroy_1 = __importDefault(require("server-destroy"));
11
- const logger_1 = require("@anmiles/logger");
12
8
  require("@anmiles/prototypes");
13
- const paths_1 = require("./paths");
14
- const renderer_1 = require("./renderer");
15
- const secrets_1 = __importDefault(require("./secrets"));
9
+ const scopes_1 = require("./scopes");
10
+ const paths_1 = require("./utils/paths");
16
11
  const port = 6006;
17
12
  const host = `localhost:${port}`;
18
- const startURI = `http://${host}/`;
19
13
  const callbackURI = `http://${host}/oauthcallback`;
20
- const tokenExpiration = 7 * 24 * 60 * 60 * 1000;
21
- const serverRetryInterval = 1000;
22
- function getScopes() {
23
- const scopesFile = (0, paths_1.getScopesFile)();
24
- const scopes = fs_1.default.getJSON(scopesFile, () => {
25
- throw new Error(secrets_1.default.getScopesError(scopesFile));
26
- });
27
- return scopes;
14
+ function checkSecrets(secretsObject) {
15
+ if (secretsObject.web.redirect_uris[0] === callbackURI) {
16
+ return true;
17
+ }
18
+ throw new Error(`Error in credentials file: redirect URI should be ${callbackURI}`);
28
19
  }
29
20
  function getSecrets(profile) {
30
21
  const secretsFile = (0, paths_1.getSecretsFile)(profile);
31
22
  const secretsObject = fs_1.default.getJSON(secretsFile, () => {
32
- throw new Error(secrets_1.default.getSecretsError(profile, secretsFile));
23
+ throw new Error(getSecretsError(secretsFile));
33
24
  });
34
- secrets_1.default.checkSecrets(profile, secretsObject, secretsFile);
25
+ checkSecrets(secretsObject);
35
26
  return secretsObject;
36
27
  }
37
- exports.getSecrets = getSecrets;
38
- async function getCredentials(profile, auth, options) {
39
- const credentialsFile = (0, paths_1.getCredentialsFile)(profile);
40
- if (options?.temporary) {
41
- return secrets_1.default.createCredentials(profile, auth, options);
42
- }
43
- return fs_1.default.getJSONAsync(credentialsFile, async () => {
44
- const refreshToken = fs_1.default.existsSync(credentialsFile) ? fs_1.default.readJSON(credentialsFile).refresh_token : undefined;
45
- const credentials = await secrets_1.default.createCredentials(profile, auth, options, refreshToken ? undefined : 'consent');
46
- return { refresh_token: refreshToken, ...credentials };
47
- }, secrets_1.default.validateCredentials);
48
- }
49
- exports.getCredentials = getCredentials;
50
- // eslint-disable-next-line @typescript-eslint/require-await -- pass sync function into async context
51
- async function validateCredentials(credentials) {
52
- if (!credentials.access_token) {
53
- return { isValid: false, validationError: 'Credentials does not have access_token' };
54
- }
55
- if (!credentials.refresh_token) {
56
- return { isValid: false, validationError: 'Credentials does not have refresh_token' };
57
- }
58
- if (!credentials.expiry_date) {
59
- return { isValid: false, validationError: 'Credentials does not have expiry_date' };
60
- }
61
- if (new Date().getTime() - credentials.expiry_date >= tokenExpiration) {
62
- return { isValid: false, validationError: 'Credentials expired' };
63
- }
64
- return { isValid: true };
65
- }
66
- async function createCredentials(profile, auth, options, prompt) {
67
- const scope = options?.scopes ?? secrets_1.default.getScopes();
68
- return new Promise((resolve) => {
69
- const authUrl = auth.generateAuthUrl({
70
- access_type: 'offline',
71
- prompt,
72
- scope,
73
- });
74
- const server = http_1.default.createServer();
75
- (0, server_destroy_1.default)(server);
76
- server.on('request', (request, response) => {
77
- if (!request.url) {
78
- response.end('');
79
- return;
80
- }
81
- const url = new URL(`http://${request.headers.host}${request.url}`);
82
- const code = url.searchParams.get('code');
83
- if (!code) {
84
- response.end((0, renderer_1.renderAuth)({ profile, authUrl, scope }));
85
- return;
86
- }
87
- response.end((0, renderer_1.renderDone)({ profile }));
88
- server.destroy();
89
- void (async () => {
90
- const { tokens } = await auth.getToken(code);
91
- resolve(tokens);
92
- })();
93
- });
94
- server.on('error', (error) => {
95
- if (error.code === 'EADDRINUSE') {
96
- setTimeout(() => server.listen(port), serverRetryInterval);
97
- }
98
- else {
99
- throw error;
100
- }
101
- });
102
- server.once('listening', () => {
103
- (0, logger_1.warn)('Please check your browser for further actions');
104
- void (0, out_url_1.open)(startURI);
105
- });
106
- server.listen(port);
107
- });
108
- }
109
- function deleteCredentials(profile) {
110
- const credentialsFile = (0, paths_1.getCredentialsFile)(profile);
111
- if (fs_1.default.existsSync(credentialsFile)) {
112
- fs_1.default.rmSync(credentialsFile);
113
- }
114
- }
115
- exports.deleteCredentials = deleteCredentials;
116
- function checkSecrets(profile, secretsObject, secretsFile) {
117
- if (secretsObject.web.redirect_uris[0] === callbackURI) {
118
- return true;
119
- }
120
- throw new Error(`Error in credentials file: redirect URI should be ${callbackURI}.\n${secrets_1.default.getSecretsError(profile, secretsFile)}`);
121
- }
122
- function getScopesError(scopesFile) {
123
- return [
124
- `File ${scopesFile} not found!`,
125
- `This application had to have pre-defined file ${scopesFile} that will declare needed scopes`,
126
- ].join('\n');
127
- }
128
- function getSecretsError(profile, secretsFile) {
28
+ function getSecretsError(secretsFile) {
29
+ const relativePath = secretsFile.replace('\\', '/');
129
30
  return [
130
- `File ${secretsFile} not found!`,
31
+ `File ${relativePath} not found!`,
131
32
  'Here is how to obtain it:',
132
33
  '\tGo to https://console.cloud.google.com/projectcreate',
133
34
  '\t\tChoose project name',
@@ -145,7 +46,7 @@ function getSecretsError(profile, secretsFile) {
145
46
  '\t\t\t\tSpecify your email as user support email and as developer contact information on the very bottom',
146
47
  '\t\t\t\tClick "Save and continue"',
147
48
  '\t\t\tClick "Add or remove scopes"',
148
- `\t\t\t\tAdd scopes: ${secrets_1.default.getScopes().join(',')}`,
49
+ `\t\t\t\tAdd scopes: ${(0, scopes_1.getScopes)().join(',')}`,
149
50
  '\t\t\t\tClick "Save and continue"',
150
51
  '\t\t\tClick "Add users"',
151
52
  '\t\t\t\tAdd your email',
@@ -157,9 +58,8 @@ function getSecretsError(profile, secretsFile) {
157
58
  '\t\t\t\tSpecify app name, i.e. "NodeJS"',
158
59
  `\t\t\t\tAdd authorized redirect URI: ${callbackURI}`,
159
60
  '\t\t\t\tClick "CREATE"',
160
- `\t\t\t\tClick "DOWNLOAD JSON" and download credentials to ./secrets/${profile}.json`,
61
+ `\t\t\t\tClick "DOWNLOAD JSON" and download credentials to ${relativePath}`,
161
62
  'Then start this script again',
162
63
  ].join('\n');
163
64
  }
164
- exports.default = { getScopes, getSecrets, getCredentials, validateCredentials, createCredentials, deleteCredentials, checkSecrets, getSecretsError, getScopesError };
165
65
  //# sourceMappingURL=secrets.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"secrets.js","sourceRoot":"","sources":["../../src/lib/secrets.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AACxB,qCAA+B;AAC/B,oEAA2C;AAE3C,4CAAuC;AAGvC,+BAA6B;AAC7B,mCAA4E;AAC5E,yCAAoD;AAEpD,wDAAgC;AAEhC,MAAM,IAAI,GAAkB,IAAI,CAAC;AACjC,MAAM,IAAI,GAAkB,aAAa,IAAI,EAAE,CAAC;AAChD,MAAM,QAAQ,GAAc,UAAU,IAAI,GAAG,CAAC;AAC9C,MAAM,WAAW,GAAW,UAAU,IAAI,gBAAgB,CAAC;AAC3D,MAAM,eAAe,GAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AACpD,MAAM,mBAAmB,GAAG,IAAI,CAAC;AAEjC,SAAS,SAAS;IACjB,MAAM,UAAU,GAAG,IAAA,qBAAa,GAAE,CAAC;IACnC,MAAM,MAAM,GAAO,YAAE,CAAC,OAAO,CAAW,UAAU,EAAE,GAAG,EAAE;QACxD,MAAM,IAAI,KAAK,CAAC,iBAAO,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AACf,CAAC;AAED,SAAS,UAAU,CAAC,OAAe;IAClC,MAAM,WAAW,GAAK,IAAA,sBAAc,EAAC,OAAO,CAAC,CAAC;IAC9C,MAAM,aAAa,GAAG,YAAE,CAAC,OAAO,CAAU,WAAW,EAAE,GAAG,EAAE;QAC3D,MAAM,IAAI,KAAK,CAAC,iBAAO,CAAC,eAAe,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;IACH,iBAAO,CAAC,YAAY,CAAC,OAAO,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC;IAC1D,OAAO,aA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0G;QAC1G,mCAAmC;QACnC,oCAAoC;QACpC,uBAAuB,IAAA,kBAAS,GAAE,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QAC9C,mCAAmC;QACnC,yBAAyB;QACzB,wBAAwB;QACxB,mCAAmC;QACnC,oDAAoD;QACpD,6CAA6C;QAC7C,+DAA+D;QAC/D,mDAAmD;QACnD,yCAAyC;QACzC,wCAAwC,WAAW,EAAE;QACrD,wBAAwB;QACxB,6DAA6D,YAAY,EAAE;QAC3E,8BAA8B;KAC9B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACd,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { templates } from '../renderer';
2
+ export declare function getProfilesFile(): string;
3
+ export declare function getScopesFile(): string;
4
+ export declare function getSecretsFile(profile: string): string;
5
+ export declare function getCredentialsFile(profile: string): string;
6
+ export declare function getTemplateFile(templateName: keyof typeof templates): string;
7
+ //# sourceMappingURL=paths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/paths.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAS7C,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAED,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,OAAO,SAAS,GAAG,MAAM,CAE5E"}
@@ -3,33 +3,31 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getTemplateFile = exports.getCredentialsFile = exports.getSecretsFile = exports.getScopesFile = exports.getProfilesFile = void 0;
6
+ exports.getProfilesFile = getProfilesFile;
7
+ exports.getScopesFile = getScopesFile;
8
+ exports.getSecretsFile = getSecretsFile;
9
+ exports.getCredentialsFile = getCredentialsFile;
10
+ exports.getTemplateFile = getTemplateFile;
7
11
  const path_1 = __importDefault(require("path"));
8
12
  const dirPaths = {
9
13
  input: 'input',
10
14
  secrets: 'secrets',
11
15
  // TODO: Remove this hack after moving to React
12
- templates: 'node_modules/@anmiles/google-api-wrapper/dist/templates',
16
+ templates: path_1.default.relative(process.cwd(), path_1.default.join(__dirname, '../../templates')),
13
17
  };
14
18
  function getProfilesFile() {
15
19
  return path_1.default.join(dirPaths.input, 'profiles.json');
16
20
  }
17
- exports.getProfilesFile = getProfilesFile;
18
21
  function getScopesFile() {
19
22
  return 'scopes.json';
20
23
  }
21
- exports.getScopesFile = getScopesFile;
22
24
  function getSecretsFile(profile) {
23
25
  return path_1.default.join(dirPaths.secrets, `${profile}.json`);
24
26
  }
25
- exports.getSecretsFile = getSecretsFile;
26
27
  function getCredentialsFile(profile) {
27
28
  return path_1.default.join(dirPaths.secrets, `${profile}.credentials.json`);
28
29
  }
29
- exports.getCredentialsFile = getCredentialsFile;
30
30
  function getTemplateFile(templateName) {
31
31
  return path_1.default.join(dirPaths.templates, `${templateName}.html`);
32
32
  }
33
- exports.getTemplateFile = getTemplateFile;
34
- exports.default = { getProfilesFile, getScopesFile, getSecretsFile, getCredentialsFile, getTemplateFile };
35
33
  //# sourceMappingURL=paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../../src/lib/utils/paths.ts"],"names":[],"mappings":";;;;;AAWA,0CAEC;AAED,sCAEC;AAED,wCAEC;AAED,gDAEC;AAED,0CAEC;AA7BD,gDAAwB;AAIxB,MAAM,QAAQ,GAAG;IAChB,KAAK,EAAM,OAAO;IAClB,OAAO,EAAI,SAAS;IACpB,+CAA+C;IAC/C,SAAS,EAAE,cAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;CAChF,CAAC;AAEF,SAAgB,eAAe;IAC9B,OAAO,cAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;AACnD,CAAC;AAED,SAAgB,aAAa;IAC5B,OAAO,aAAa,CAAC;AACtB,CAAC;AAED,SAAgB,cAAc,CAAC,OAAe;IAC7C,OAAO,cAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,GAAG,OAAO,OAAO,CAAC,CAAC;AACvD,CAAC;AAED,SAAgB,kBAAkB,CAAC,OAAe;IACjD,OAAO,cAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,GAAG,OAAO,mBAAmB,CAAC,CAAC;AACnE,CAAC;AAED,SAAgB,eAAe,CAAC,YAAoC;IACnE,OAAO,cAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,GAAG,YAAY,OAAO,CAAC,CAAC;AAC9D,CAAC"}
@@ -1,7 +1,7 @@
1
1
  <h1>Welcome ${profile}!</h1>
2
2
  <p>Please authorize:</p>
3
3
  <ul>
4
- ${scopesList}
4
+ ${scopesList}
5
5
  </ul>
6
6
  <a id="button" href="${authUrl}">Continue</a>
7
7
  <script type="text/javascript">document.addEventListener('DOMContentLoaded', function(){ document.getElementById('button').focus(); });</script>
@@ -1,12 +1,17 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
3
  <head>
4
- <title>Google API sign-in</title>
4
+ <title>Google API sign-in'</title>
5
5
  <meta charset="utf-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
6
7
  </head>
7
8
  <body>
8
9
 
10
+ ${style}
11
+
9
12
  ${page}
10
13
 
14
+ ${script}
15
+
11
16
  </body>
12
17
  </html>
@@ -1,4 +1,3 @@
1
- ${css}
2
1
  <div class="box">
3
- ${content}
2
+ ${content}
4
3
  </div>
File without changes
@@ -11,8 +11,8 @@
11
11
  }
12
12
 
13
13
  body {
14
- font-family: Arial, sans-serif;
15
- font-size: 17px;
14
+ font-family: "Segoe UI", "Roboto", "Helvetica", sans-serif;
15
+ font-size: 16px;
16
16
  display: flex;
17
17
  align-items: center;
18
18
  justify-content: center;
@@ -1,9 +1,8 @@
1
- interface CommonOptions {
1
+ export interface CommonOptions {
2
2
  hideProgress?: boolean;
3
3
  }
4
- interface AuthOptions {
4
+ export interface AuthOptions {
5
5
  temporary?: boolean;
6
6
  scopes?: string[];
7
7
  }
8
- export type { CommonOptions, AuthOptions };
9
8
  //# sourceMappingURL=options.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/types/options.ts"],"names":[],"mappings":"AAAA,UAAU,aAAa;IACtB,YAAY,CAAC,EAAG,OAAO,CAAC;CACxB;AAED,UAAU,WAAW;IACpB,SAAS,CAAC,EAAG,OAAO,CAAC;IACrB,MAAM,CAAC,EAAM,MAAM,EAAE,CAAC;CACtB;AAED,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/types/options.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC7B,YAAY,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB"}
@@ -1,4 +1,4 @@
1
- interface Secrets {
1
+ export interface Secrets {
2
2
  web: {
3
3
  client_id: `${string}.apps.googleusercontent.com`;
4
4
  project_id: string;
@@ -9,5 +9,4 @@ interface Secrets {
9
9
  redirect_uris: string[];
10
10
  };
11
11
  }
12
- export type { Secrets };
13
12
  //# sourceMappingURL=secrets.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../../src/types/secrets.ts"],"names":[],"mappings":"AAAA,UAAU,OAAO;IAChB,GAAG,EAAE;QACJ,SAAS,EAAqB,GAAG,MAAM,6BAA6B,CAAC;QACrE,UAAU,EAAoB,MAAM,CAAC;QACrC,QAAQ,EAAsB,2CAA2C,CAAC;QAC1E,SAAS,EAAqB,qCAAqC,CAAC;QACpE,2BAA2B,EAAG,4CAA4C,CAAC;QAC3E,aAAa,EAAiB,MAAM,CAAC;QACrC,aAAa,EAAiB,MAAM,EAAE,CAAC;KACvC,CAAC;CACF;AAED,YAAY,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../../src/types/secrets.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACvB,GAAG,EAAE;QACJ,SAAS,EAAE,GAAG,MAAM,6BAA6B,CAAC;QAClD,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,2CAA2C,CAAC;QACtD,SAAS,EAAE,qCAAqC,CAAC;QACjD,2BAA2B,EAAE,4CAA4C,CAAC;QAC1E,aAAa,EAAE,MAAM,CAAC;QACtB,aAAa,EAAE,MAAM,EAAE,CAAC;KACxB,CAAC;CACF"}