ogscrap 1.0.0 → 1.0.2
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.
- package/.github/workflows/publish-package.yml +35 -0
- package/app/example.ts +3 -3
- package/package.json +8 -3
- package/tsconfig.json +51 -51
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: publish-package
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- main # Trigger on pushes to the main branch
|
|
6
|
+
jobs:
|
|
7
|
+
publish:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
steps:
|
|
10
|
+
- name: Checkout repository
|
|
11
|
+
uses: actions/checkout@v3
|
|
12
|
+
with:
|
|
13
|
+
fetch-depth: 0
|
|
14
|
+
|
|
15
|
+
- name: Setup Node.js
|
|
16
|
+
uses: actions/setup-node@v4
|
|
17
|
+
with:
|
|
18
|
+
node-version: 'lts/*'
|
|
19
|
+
registry-url: 'https://registry.npmjs.org/'
|
|
20
|
+
|
|
21
|
+
- name: Install dependencies
|
|
22
|
+
run: npm ci
|
|
23
|
+
|
|
24
|
+
- name: Configure Git
|
|
25
|
+
run: |
|
|
26
|
+
git config --global user.name 'abdelrahmen1313'
|
|
27
|
+
git config --global user.email ${{ secrets.EMAIL }}
|
|
28
|
+
|
|
29
|
+
- name: Patch Version
|
|
30
|
+
run : npm version patch
|
|
31
|
+
|
|
32
|
+
- name: Publish to npm
|
|
33
|
+
run: npm publish
|
|
34
|
+
env:
|
|
35
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/app/example.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fetchPageMetadata } from "./page-metadata.js";
|
|
2
|
-
const data = await fetchPageMetadata("https://medium.com/@pshubham/using-react-with-cordova-f235de698cc3");
|
|
3
|
-
console.log(data);
|
|
1
|
+
import { fetchPageMetadata } from "./page-metadata.js";
|
|
2
|
+
const data = await fetchPageMetadata("https://medium.com/@pshubham/using-react-with-cordova-f235de698cc3");
|
|
3
|
+
console.log(data);
|
|
4
4
|
//https://fr.wikipedia.org/wiki/Ski_acrobatique_aux_Jeux_olympiques_de_2026
|
package/package.json
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ogscrap",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Lightweight utility to fetch a web page and extract clean metadata.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"build"
|
|
7
|
+
"build": "tsc"
|
|
8
8
|
},
|
|
9
|
-
"keywords": [
|
|
9
|
+
"keywords": [
|
|
10
|
+
"metadata",
|
|
11
|
+
"ogscrap",
|
|
12
|
+
"page-metadata",
|
|
13
|
+
"scraper"
|
|
14
|
+
],
|
|
10
15
|
"author": "edah",
|
|
11
16
|
"license": "MIT",
|
|
12
17
|
"type": "module",
|
package/tsconfig.json
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
{
|
|
2
|
-
// Visit https://aka.ms/tsconfig to read more about this file
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
// File Layout
|
|
5
|
-
"rootDir": "./app",
|
|
6
|
-
"outDir": "./dist",
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
// Environment Settings
|
|
12
|
-
// See also https://aka.ms/tsconfig/module
|
|
13
|
-
"module": "nodenext",
|
|
14
|
-
"target": "esnext",
|
|
15
|
-
"types": [],
|
|
16
|
-
// For nodejs:
|
|
17
|
-
// "lib": ["esnext"],
|
|
18
|
-
// "types": ["node"],
|
|
19
|
-
// and npm install -D @types/node
|
|
20
|
-
|
|
21
|
-
// Other Outputs
|
|
22
|
-
"sourceMap": false,
|
|
23
|
-
"declaration": true,
|
|
24
|
-
"declarationMap": false,
|
|
25
|
-
|
|
26
|
-
// Stricter Typechecking Options
|
|
27
|
-
"noUncheckedIndexedAccess": true,
|
|
28
|
-
"exactOptionalPropertyTypes": true,
|
|
29
|
-
|
|
30
|
-
// Style Options
|
|
31
|
-
// "noImplicitReturns": true,
|
|
32
|
-
// "noImplicitOverride": true,
|
|
33
|
-
// "noUnusedLocals": true,
|
|
34
|
-
// "noUnusedParameters": true,
|
|
35
|
-
// "noFallthroughCasesInSwitch": true,
|
|
36
|
-
// "noPropertyAccessFromIndexSignature": true,
|
|
37
|
-
|
|
38
|
-
// Recommended Options
|
|
39
|
-
"strict": true,
|
|
40
|
-
|
|
41
|
-
"verbatimModuleSyntax": true,
|
|
42
|
-
"isolatedModules": true,
|
|
43
|
-
"noUncheckedSideEffectImports": true,
|
|
44
|
-
"moduleDetection": "force",
|
|
45
|
-
"skipLibCheck": true,
|
|
46
|
-
},
|
|
47
|
-
"exclude" : [
|
|
48
|
-
"node_modules",
|
|
49
|
-
"./app/example.ts"
|
|
50
|
-
],
|
|
51
|
-
}
|
|
1
|
+
{
|
|
2
|
+
// Visit https://aka.ms/tsconfig to read more about this file
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
// File Layout
|
|
5
|
+
"rootDir": "./app",
|
|
6
|
+
"outDir": "./dist",
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
// Environment Settings
|
|
12
|
+
// See also https://aka.ms/tsconfig/module
|
|
13
|
+
"module": "nodenext",
|
|
14
|
+
"target": "esnext",
|
|
15
|
+
"types": [],
|
|
16
|
+
// For nodejs:
|
|
17
|
+
// "lib": ["esnext"],
|
|
18
|
+
// "types": ["node"],
|
|
19
|
+
// and npm install -D @types/node
|
|
20
|
+
|
|
21
|
+
// Other Outputs
|
|
22
|
+
"sourceMap": false,
|
|
23
|
+
"declaration": true,
|
|
24
|
+
"declarationMap": false,
|
|
25
|
+
|
|
26
|
+
// Stricter Typechecking Options
|
|
27
|
+
"noUncheckedIndexedAccess": true,
|
|
28
|
+
"exactOptionalPropertyTypes": true,
|
|
29
|
+
|
|
30
|
+
// Style Options
|
|
31
|
+
// "noImplicitReturns": true,
|
|
32
|
+
// "noImplicitOverride": true,
|
|
33
|
+
// "noUnusedLocals": true,
|
|
34
|
+
// "noUnusedParameters": true,
|
|
35
|
+
// "noFallthroughCasesInSwitch": true,
|
|
36
|
+
// "noPropertyAccessFromIndexSignature": true,
|
|
37
|
+
|
|
38
|
+
// Recommended Options
|
|
39
|
+
"strict": true,
|
|
40
|
+
|
|
41
|
+
"verbatimModuleSyntax": true,
|
|
42
|
+
"isolatedModules": true,
|
|
43
|
+
"noUncheckedSideEffectImports": true,
|
|
44
|
+
"moduleDetection": "force",
|
|
45
|
+
"skipLibCheck": true,
|
|
46
|
+
},
|
|
47
|
+
"exclude" : [
|
|
48
|
+
"node_modules",
|
|
49
|
+
"./app/example.ts"
|
|
50
|
+
],
|
|
51
|
+
}
|