bus-mj 1.0.2 → 1.1.0

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/index.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ // index.d.ts
2
+
3
+ declare module 'bus-mj' {
4
+ export function getBus(): any; // Remplacez 'any' par le type approprié
5
+ export function getAllBus(): any; // Remplacez 'any' par le type approprié
6
+ export function getAllStop(): any; // Remplacez 'any' par le type approprié
7
+ export function getStop(): any; // Remplacez 'any' par le type approprié
8
+ }
9
+
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "bus-mj",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "description": "package for BUS station in Mahajanga",
5
5
  "main": "index.js",
6
+ "typings": "index.d.ts",
6
7
  "scripts": {
7
8
  "test": "echo \"Error: no test specified\" && exit 1"
8
9
  },
package/src/bus.js ADDED
@@ -0,0 +1,67 @@
1
+ const datao = [
2
+ {
3
+ "id": 3,
4
+ "name": "ligne 3",
5
+ "trajet": ["belobaka", "sotema", "mahabibo", "androva"],
6
+ "stop": ["belobaka", "star", "plaque 7", "loterana", "bazary kely", "csb", "croisement cimetiere", "jovena", "lalatapaka", "plaque", "miaramila", "bazary antanimasaja", "pompy", "bizo", "galana", "manjarisoa", "jardin Caylah", "bain douche", "photo sport", "hôtel de ville", "croix rouge", "poste", "bognet", "tribunal", "bfv", "androva"],
7
+ "plaque": "",
8
+ "color": "jaune",
9
+ "bande": "bleu"
10
+ },
11
+ {
12
+ "id": 5,
13
+ "name": "ligne 5",
14
+ "trajet": ["betamanga", "mazava huile", "tsaramandroso", "mahabibo", "androva"],
15
+ "stop": ["betamanga", "mazava huile", "ex bar nene", "pont blanc", "tsaralaza", "maki-loc", "patel", "photo sport", "hôtel de ville", "croix rouge", "poste", "bognet", "tribunal", "bfv", "androva"],
16
+ "plaque": "",
17
+ "color": "blanc",
18
+ "bande": "rouge"
19
+ },
20
+ {
21
+ "id": 70,
22
+ "name": "ligne 7",
23
+ "trajet": ["belobaka", "sotema", "mahabibo", "tsaramandroso", "mahavoky atsimo", "la corniche", "majunga be", "mahabibo", "sotema", "belobaka"],
24
+ "stop": ["bain douche", "patel", "maki-loc", "tsaralaza", "pont blanc", "maman'i phillipine", "rond point cité", "rond point taxi", "croisement soatata", "secaline", "bar rotsaka", "croisement bloc", "pharmacie", "hopital manarapenitra", "caserne", "barea", "airtel", "solima", "lycée technique", "élevage", "roche rouge", "maison verte", "jardin d'amour", "nandrasana", "cnaps", "bord", "akbar", "kakal", "boa", "Bazary be", "score", "poste", "croix rouge", "hôtel de ville", "mahabibo", "galax", "jardin Caylah", "manjarisoa", "galana", "bizo", "pompy", "bazary antanimasaja", "miaramila", "plaque", "lalatapaka", "jovena", "croisement cimetiere", "csb", "bazary kely", "loterana", "plaque 7", "star", "belobaka"],
25
+ "plaque": "bleu",
26
+ "color": "jaune",
27
+ "bande": "bleu et rouge"
28
+ },
29
+ {
30
+ "id": 71,
31
+ "name": "ligne 7",
32
+ "trajet": ["belobaka", "sotema", "mahabibo", "majunga be", "la corniche", "mahavoky atsimo", "tsaramandroso", "mahabibo", "sotema", "belobaka"],
33
+ "stop": ["bain douche", "photo sport", "hôtel de ville", "croix rouge", "poste", "score", "Bazary be", "boa", "kakal", "akbar", "bord", "cnaps", "nandrasana", "jardin d'amour", "maison verte", "roche rouge", "élevage", "lycée technique", "solima", "airtel", "barea", "caserne", "hopital manarapenitra", "pharmacie", "croisement bloc", "bar rotsaka", "secaline", "croisement soatata", "rond point taxi", "rond point cité", "maman'i phillipine", "pont blanc", "tsaralaza", "maki-loc", "bata", "patel", "mahabibo", "bain douche", "jardin Caylah", "manjarisoa", "galana", "bizo", "pompy", "bazary antanimasaja", "miaramila", "plaque", "lalatapaka", "jovena", "croisement cimetiere", "csb", "bazary kely", "loterana", "plaque 7", "star", "belobaka"],
34
+ "plaque": "rouge",
35
+ "color": "jaune",
36
+ "bande": "bleu et rouge"
37
+ },
38
+ {
39
+ "id": 8,
40
+ "name": "ligne 8",
41
+ "trajet": [""],
42
+ "stop": ["raseta", "poteau mainty", "eponge", "mazava huile", "bar nene", "pont blanc", "tsaralaza", "maki-loc", "bata", "patel", "mahabibo", "bain douche", "jardin Caylah", "manjarisoa", "galana", "bizo", "pompy", "bazary antanimasaja", "miaramila", "plaque", "lalatapaka", "jovena", "croisement cimetiere", "..."],
43
+ "plaque": "",
44
+ "color": "blanc",
45
+ "bande": "rouge"
46
+ },
47
+ {
48
+ "id": 11,
49
+ "name": "ligne 11",
50
+ "trajet": [""],
51
+ "stop": [""],
52
+ "plaque": "",
53
+ "color": "blanc",
54
+ "bande": "vert"
55
+ },
56
+ {
57
+ "id": 15,
58
+ "name": "ligne 15",
59
+ "trajet": [""],
60
+ "stop": ["Antanimalandy", "Plaque", "Mangabe", "Fokotany", "Arabo", "Bazary kely", "Vavahady", "croisement cimetière", "Jovena", "Lala-tapaka", "Plaque", "Miaramila", "Bazary antanimasaja", "Pompy", "Bizo", "Antafa", "Galana", "Manjarisoa", "Jardin cayla", "Bain douche", "police", "jentilal", "patel", "makiloc", "tsaralaza", "bar néné", "jirama", "mazava huile", "eponge", "poto mainty", "raseta", "croisement amborovy", "csb", "epp manarapenitra", "petite plage", "belinta", "grand pavois"],
61
+ "plaque": "",
62
+ "color": "jaune",
63
+ "bande": "vert"
64
+ }
65
+ ];
66
+
67
+ module.exports = { datao }
@@ -1,16 +1,12 @@
1
- const { readFile } = require('fs').promises;
1
+ const { datao } = require('./bus.js')
2
2
 
3
3
  // declarer un fonction asyncronisee pour lire un fichier
4
4
  async function read_contenu() {
5
5
 
6
6
  try {
7
7
 
8
- // lire le fichier bus.js, et assigner a unn variable le contenu
9
- const data = await readFile('src/bus.json', 'utf8');
10
- // charger en tant que JSON le contenue
11
- const jsonData = JSON.parse(data);
12
- // retourner a la fonction l'objet obtenus
13
- return jsonData.data;
8
+ // retourner la variable datao qui contien tous les donnees
9
+ return datao;
14
10
 
15
11
  } catch (err) {
16
12
 
package/tsconfig.json ADDED
File without changes
package/src/bus.json DELETED
@@ -1,67 +0,0 @@
1
- {
2
- "data": [
3
- {
4
- "id": 3,
5
- "name": "ligne 3",
6
- "trajet": ["belobaka", "sotema", "mahabibo", "androva"],
7
- "stop": ["belobaka", "star", "plaque 7", "loterana", "bazary kely", "csb", "croisement cimetiere", "jovena", "lalatapaka", "plaque", "miaramila", "bazary antanimasaja", "pompy", "bizo", "galana", "manjarisoa", "jardin Caylah", "bain douche", "photo sport", "hôtel de ville", "croix rouge", "poste", "bognet", "tribunal", "bfv", "androva"],
8
- "plaque": "",
9
- "color": "jaune",
10
- "bande": "bleu"
11
- },
12
- {
13
- "id": 5,
14
- "name": "ligne 5",
15
- "trajet": ["betamanga", "mazava huile", "tsaramandroso", "mahabibo", "androva"],
16
- "stop": ["betamanga", "mazava huile", "ex bar nene", "pont blanc", "tsaralaza", "maki-loc", "patel", "photo sport", "hôtel de ville", "croix rouge", "poste", "bognet", "tribunal", "bfv", "androva"],
17
- "plaque": "",
18
- "color": "blanc",
19
- "bande": "rouge"
20
- },
21
- {
22
- "id": 70,
23
- "name": "ligne 7",
24
- "trajet": ["belobaka", "sotema", "mahabibo", "tsaramandroso", "mahavoky atsimo", "la corniche", "majunga be", "mahabibo", "sotema", "belobaka"],
25
- "stop": ["bain douche", "patel", "maki-loc", "tsaralaza", "pont blanc", "maman'i phillipine", "rond point cité", "rond point taxi", "croisement soatata", "secaline", "bar rotsaka", "croisement bloc", "pharmacie", "hopital manarapenitra", "caserne", "barea", "airtel", "solima", "lycée technique", "élevage", "roche rouge", "maison verte", "jardin d'amour", "nandrasana", "cnaps", "bord", "akbar", "kakal", "boa", "Bazary be", "score", "poste", "croix rouge", "hôtel de ville", "mahabibo", "galax", "jardin Caylah", "manjarisoa", "galana", "bizo", "pompy", "bazary antanimasaja", "miaramila", "plaque", "lalatapaka", "jovena", "croisement cimetiere", "csb", "bazary kely", "loterana", "plaque 7", "star", "belobaka"],
26
- "plaque": "bleu",
27
- "color": "jaune",
28
- "bande": "bleu et rouge"
29
- },
30
- {
31
- "id": 71,
32
- "name": "ligne 7",
33
- "trajet": ["belobaka", "sotema", "mahabibo", "majunga be", "la corniche", "mahavoky atsimo", "tsaramandroso", "mahabibo", "sotema", "belobaka"],
34
- "stop": ["bain douche", "photo sport", "hôtel de ville", "croix rouge", "poste", "score", "Bazary be", "boa", "kakal", "akbar", "bord", "cnaps", "nandrasana", "jardin d'amour", "maison verte", "roche rouge", "élevage", "lycée technique", "solima", "airtel", "barea", "caserne", "hopital manarapenitra", "pharmacie", "croisement bloc", "bar rotsaka", "secaline", "croisement soatata", "rond point taxi", "rond point cité", "maman'i phillipine", "pont blanc", "tsaralaza", "maki-loc", "bata", "patel", "mahabibo", "bain douche", "jardin Caylah", "manjarisoa", "galana", "bizo", "pompy", "bazary antanimasaja", "miaramila", "plaque", "lalatapaka", "jovena", "croisement cimetiere", "csb", "bazary kely", "loterana", "plaque 7", "star", "belobaka"],
35
- "plaque": "rouge",
36
- "color": "jaune",
37
- "bande": "bleu et rouge"
38
- },
39
- {
40
- "id": 8,
41
- "name": "ligne 8",
42
- "trajet": [""],
43
- "stop": ["raseta", "poteau mainty", "eponge", "mazava huile", "bar nene", "pont blanc", "tsaralaza", "maki-loc", "bata", "patel", "mahabibo", "bain douche", "jardin Caylah", "manjarisoa", "galana", "bizo", "pompy", "bazary antanimasaja", "miaramila", "plaque", "lalatapaka", "jovena", "croisement cimetiere", "..."],
44
- "plaque": "",
45
- "color": "blanc",
46
- "bande": "rouge"
47
- },
48
- {
49
- "id": 11,
50
- "name": "ligne 11",
51
- "trajet": [""],
52
- "stop": [""],
53
- "plaque": "",
54
- "color": "blanc",
55
- "bande": "vert"
56
- },
57
- {
58
- "id": 15,
59
- "name": "ligne 15",
60
- "trajet": [""],
61
- "stop": ["Antanimalandy", "Plaque", "Mangabe", "Fokotany", "Arabo", "Bazary kely", "Vavahady", "croisement cimetière", "Jovena", "Lala-tapaka", "Plaque", "Miaramila", "Bazary antanimasaja", "Pompy", "Bizo", "Antafa", "Galana", "Manjarisoa", "Jardin cayla", "Bain douche", "police", "jentilal", "patel", "makiloc", "tsaralaza", "bar néné", "jirama", "mazava huile", "eponge", "poto mainty", "raseta", "croisement amborovy", "csb", "epp manarapenitra", "petite plage", "belinta", "grand pavois"],
62
- "plaque": "",
63
- "color": "jaune",
64
- "bande": "vert"
65
- }
66
- ]
67
- }